org.eclipse.emf.ecore.resource
Class URIConverter.ReadableInputStream
java.lang.Object
java.io.InputStream
org.eclipse.emf.ecore.resource.URIConverter.ReadableInputStream
- All Implemented Interfaces:
- java.io.Closeable, URIConverter.Readable
- Enclosing interface:
- URIConverter
public static class URIConverter.ReadableInputStream
- extends java.io.InputStream
- implements URIConverter.Readable
A wrapper around a reader that implements an input stream but can be unwrapped to access the reader directly.
Method Summary |
java.io.Reader |
asReader()
Returns a reader that provides access to the same underlying data as the input stream itself. |
void |
close()
|
java.lang.String |
getEncoding()
Returns the encoding used to convert the reader's characters to bytes. |
static java.lang.String |
getEncoding(java.io.Reader xmlReader)
|
static java.lang.String |
getEncoding(java.lang.String xmlString)
|
int |
read()
|
void |
reset()
|
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, read, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encoding
protected java.lang.String encoding
reader
protected java.io.Reader reader
buffer
protected URIConverter.ReadableInputStream.Buffer buffer
URIConverter.ReadableInputStream
public URIConverter.ReadableInputStream(java.io.Reader reader,
java.lang.String encoding)
URIConverter.ReadableInputStream
public URIConverter.ReadableInputStream(java.io.Reader xmlReader)
- Since:
- 2.4
URIConverter.ReadableInputStream
public URIConverter.ReadableInputStream(java.lang.String string,
java.lang.String encoding)
URIConverter.ReadableInputStream
public URIConverter.ReadableInputStream(java.lang.String xmlString)
getEncoding
public static java.lang.String getEncoding(java.lang.String xmlString)
getEncoding
public static java.lang.String getEncoding(java.io.Reader xmlReader)
- Since:
- 2.4
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
java.io.IOException
asReader
public java.io.Reader asReader()
- Description copied from interface:
URIConverter.Readable
- Returns a reader that provides access to the same underlying data as the input stream itself.
- Specified by:
asReader
in interface URIConverter.Readable
- Returns:
- a reader that provides access to the same underlying data as the input stream itself.
getEncoding
public java.lang.String getEncoding()
- Description copied from interface:
URIConverter.Readable
- Returns the encoding used to convert the reader's characters to bytes.
- Specified by:
getEncoding
in interface URIConverter.Readable
- Returns:
- the encoding used to convert the reader's characters to bytes.
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.InputStream
- Throws:
java.io.IOException
reset
public void reset()
throws java.io.IOException
- Overrides:
reset
in class java.io.InputStream
- Throws:
java.io.IOException