public abstract class AbstractXDIReader extends Object implements XDIReader
Modifier and Type | Field and Description |
---|---|
static Charset |
DEFAULT_CHARSET |
protected Properties |
parameters |
Constructor and Description |
---|
AbstractXDIReader(Properties parameters) |
Modifier and Type | Method and Description |
---|---|
String |
getFileExtension()
Returns the file extension of this XDIReader, e.g.
|
String |
getFormat()
Returns the format this XDIReader can read, e.g.
|
MimeType |
getMimeType()
Returns the mime type this XDIReader can read, e.g.
|
protected abstract void |
init() |
InputStream |
read(Graph graph,
InputStream stream)
Reads an XDI graph from a byte stream.
|
boolean |
supportsFileExtension(String fileExtension)
Checks if a given file extension is supported.
|
boolean |
supportsFormat(String format)
Checks if a given format is supported.
|
boolean |
supportsMimeType(MimeType mimeType)
Checks if a given mime type is supported.
|
public static final Charset DEFAULT_CHARSET
protected Properties parameters
public AbstractXDIReader(Properties parameters)
protected abstract void init()
public InputStream read(Graph graph, InputStream stream) throws IOException, Xdi2ParseException
XDIReader
read
in interface XDIReader
graph
- A graph that will hold the read data.stream
- A byte stream from which to read.IOException
Xdi2ParseException
public final String getFormat()
XDIReader
public final String getFileExtension()
XDIReader
getFileExtension
in interface XDIReader
public final MimeType getMimeType()
XDIReader
getMimeType
in interface XDIReader
public boolean supportsFormat(String format)
XDIReader
supportsFormat
in interface XDIReader
public boolean supportsFileExtension(String fileExtension)
XDIReader
supportsFileExtension
in interface XDIReader
public boolean supportsMimeType(MimeType mimeType)
XDIReader
supportsMimeType
in interface XDIReader
Copyright © 2017. All rights reserved.