public class EmbeddingHTMLParsingReader extends ParsingReader
final String uuid = UUID.randomUUID().toString();
final String open = uuid + "/";
final String close = "/" + uuid;
context.set(Parser.class, EmptyParser.INSTANCE);
context.set(EmbeddedDocumentExtractor.class, new EmbedLinker(document, tmp, open, close));
reader = new EmbeddingHTMLParsingReader(document, open, close, parser, input, metadata, context);
| Constructor and Description |
|---|
EmbeddingHTMLParsingReader(TikaDocument parent,
String open,
String close,
org.apache.tika.parser.Parser parser,
org.apache.tika.io.TikaInputStream input,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.parser.ParseContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the read end of the pipe.
|
int |
read(char[] buffer,
int offset,
int length)
Reads parsed text from the pipe connected to the parsing thread.
|
parsepublic EmbeddingHTMLParsingReader(TikaDocument parent, String open, String close, org.apache.tika.parser.Parser parser, org.apache.tika.io.TikaInputStream input, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException
IOExceptionpublic int read(char[] buffer,
int offset,
int length)
throws IOException
ParsingReaderread in class ParsingReaderbuffer - character bufferoffset - start offset within the bufferlength - maximum number of characters to readIOException - if the parsing thread has failed or
if for some reason the pipe does not work properlypublic void close()
throws IOException
ParsingReaderclose in interface Closeableclose in interface AutoCloseableclose in class ParsingReaderIOException - if the pipe cannot be closedCopyright © 2018 The International Consortium of Investigative Journalists. All rights reserved.