public class AppleSingleFileParser extends AbstractParser
See spec document.
| Modifier and Type | Class and Description |
|---|---|
private class |
AppleSingleFileParser.FieldInfo |
private static class |
AppleSingleFileParser.FieldInfoComparator |
| Modifier and Type | Field and Description |
|---|---|
private static int |
AFP_FILE_INFO |
private static int |
COMMENT |
private static int |
DATA_FORK
Entry types
|
private static int |
DIRECTORY_ID |
private static int |
FILE_DATES_INFO |
private static int |
FINDER_INFO |
private static int |
ICON_BW |
private static int |
ICON_COLOR |
private static int |
MACINTOSH_FILE_INFO |
private static int |
MSDOS_FILE_INFO |
private static int |
PRODOS_FILE_INFO |
private static int |
REAL_NAME |
private static int |
RESOURCE_FORK |
private static int |
SHORT_NAME |
private static java.util.Set<MediaType> |
SUPPORTED_TYPES |
| Constructor and Description |
|---|
AppleSingleFileParser() |
| Modifier and Type | Method and Description |
|---|---|
private AppleSingleFileParser.FieldInfo |
getContentFieldInfo(java.util.List<AppleSingleFileParser.FieldInfo> fieldInfoList) |
private java.util.List<AppleSingleFileParser.FieldInfo> |
getSortedFieldInfoList(java.io.InputStream stream,
short numEntries) |
java.util.Set<MediaType> |
getSupportedTypes(ParseContext context)
Returns the set of media types supported by this parser when used
with the given parse context.
|
void |
parse(java.io.InputStream stream,
org.xml.sax.ContentHandler handler,
Metadata metadata,
ParseContext context)
Parses a document stream into a sequence of XHTML SAX events.
|
private long |
processFieldEntries(java.io.InputStream stream,
java.util.List<AppleSingleFileParser.FieldInfo> fieldInfoList,
Metadata embeddedMetadata,
long bytesRead) |
private short |
readThroughNumEntries(java.io.InputStream stream) |
parseprivate static final int DATA_FORK
private static final int RESOURCE_FORK
private static final int REAL_NAME
private static final int COMMENT
private static final int ICON_BW
private static final int ICON_COLOR
private static final int FILE_DATES_INFO
private static final int FINDER_INFO
private static final int MACINTOSH_FILE_INFO
private static final int PRODOS_FILE_INFO
private static final int MSDOS_FILE_INFO
private static final int SHORT_NAME
private static final int AFP_FILE_INFO
private static final int DIRECTORY_ID
private static final java.util.Set<MediaType> SUPPORTED_TYPES
public java.util.Set<MediaType> getSupportedTypes(ParseContext context)
Parsercontext - parse contextpublic void parse(java.io.InputStream stream,
org.xml.sax.ContentHandler handler,
Metadata metadata,
ParseContext context)
throws java.io.IOException,
org.xml.sax.SAXException,
TikaException
ParserThe given document stream is consumed but not closed by this method. The responsibility to close the stream remains on the caller.
Information about the parsing context can be passed in the context parameter. See the parser implementations for the kinds of context information they expect.
stream - the document stream (input)handler - handler for the XHTML SAX events (output)metadata - document metadata (input and output)context - parse contextjava.io.IOException - if the document stream could not be readorg.xml.sax.SAXException - if the SAX events could not be processedTikaException - if the document could not be parsedprivate AppleSingleFileParser.FieldInfo getContentFieldInfo(java.util.List<AppleSingleFileParser.FieldInfo> fieldInfoList)
private long processFieldEntries(java.io.InputStream stream,
java.util.List<AppleSingleFileParser.FieldInfo> fieldInfoList,
Metadata embeddedMetadata,
long bytesRead)
throws java.io.IOException,
TikaException
java.io.IOExceptionTikaExceptionprivate java.util.List<AppleSingleFileParser.FieldInfo> getSortedFieldInfoList(java.io.InputStream stream, short numEntries) throws java.io.IOException, TikaException
java.io.IOExceptionTikaExceptionprivate short readThroughNumEntries(java.io.InputStream stream)
throws TikaException,
java.io.IOException
TikaExceptionjava.io.IOException