
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
XDIReaderread in interface XDIReadergraph - A graph that will hold the read data.stream - A byte stream from which to read.IOExceptionXdi2ParseExceptionpublic final String getFormat()
XDIReaderpublic final String getFileExtension()
XDIReadergetFileExtension in interface XDIReaderpublic final MimeType getMimeType()
XDIReadergetMimeType in interface XDIReaderpublic boolean supportsFormat(String format)
XDIReadersupportsFormat in interface XDIReaderpublic boolean supportsFileExtension(String fileExtension)
XDIReadersupportsFileExtension in interface XDIReaderpublic boolean supportsMimeType(MimeType mimeType)
XDIReadersupportsMimeType in interface XDIReaderCopyright © 2017. All rights reserved.