public abstract class Spewer extends Object implements AutoCloseable, Serializable
ParsingReader to specific
endpoints.| Modifier and Type | Class and Description |
|---|---|
protected static class |
Spewer.MapValueConsumer |
protected static class |
Spewer.MapValuesConsumer |
| Modifier and Type | Field and Description |
|---|---|
protected FieldNames |
fields |
protected boolean |
outputMetadata |
protected Map<String,String> |
tags |
| Constructor and Description |
|---|
Spewer() |
Spewer(FieldNames fields) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Spewer |
configure(Options<String> options) |
protected void |
copy(Reader input,
OutputStream output) |
static void |
copy(Reader input,
Writer output) |
FieldNames |
getFields() |
protected Map<String,Object> |
getMetadata(TikaDocument document) |
Charset |
getOutputEncoding() |
boolean |
outputMetadata() |
void |
outputMetadata(boolean outputMetadata) |
void |
setOutputEncoding(Charset outputEncoding) |
void |
setTags(Map<String,String> tags) |
static String |
toString(Reader reader) |
TikaDocument[] |
write(Path path) |
void |
write(TikaDocument document,
Reader reader) |
protected abstract void |
writeDocument(TikaDocument doc,
Reader reader,
TikaDocument parent,
TikaDocument root,
int level) |
protected boolean outputMetadata
protected final FieldNames fields
public Spewer()
public Spewer(FieldNames fields)
protected abstract void writeDocument(TikaDocument doc, Reader reader, TikaDocument parent, TikaDocument root, int level) throws IOException
IOExceptionpublic void write(TikaDocument document, Reader reader) throws IOException
IOExceptionpublic TikaDocument[] write(Path path) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic FieldNames getFields()
public void setOutputEncoding(Charset outputEncoding)
public Charset getOutputEncoding()
public void outputMetadata(boolean outputMetadata)
public boolean outputMetadata()
protected void copy(Reader input, OutputStream output) throws IOException
IOExceptionpublic static void copy(Reader input, Writer output) throws IOException
IOExceptionpublic static String toString(Reader reader) throws IOException
IOExceptionprotected Map<String,Object> getMetadata(TikaDocument document) throws IOException
IOExceptionpublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2019 The International Consortium of Investigative Journalists. All rights reserved.