org.eclipse.emf.ecore.resource
Class URIConverter.WriteableOutputStream
java.lang.Object
java.io.OutputStream
org.eclipse.emf.ecore.resource.URIConverter.WriteableOutputStream
- All Implemented Interfaces:
- URIConverter.Writeable
- Enclosing class:
- URIConverter
- public static class URIConverter.WriteableOutputStream
- extends OutputStream
- implements URIConverter.Writeable
A wrapper around a writer that implements an output stream but can be unwrapped to access the writer directly.
Method Summary |
Writer |
asWriter()
Returns a writer that provides access to the same underlying data as the input stream itself. |
void |
close()
|
void |
flush()
|
String |
getEncoding()
Returns the encoding used to convert the writer's bytes to characters. |
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encoding
protected String encoding
writer
protected Writer writer
buffer
protected URIConverter.WriteableOutputStream.Buffer buffer
URIConverter.WriteableOutputStream
public URIConverter.WriteableOutputStream(Writer writer,
String encoding)
write
public void write(int b)
throws IOException
- Throws:
IOException
asWriter
public Writer asWriter()
- Description copied from interface:
URIConverter.Writeable
- Returns a writer that provides access to the same underlying data as the input stream itself.
- Specified by:
asWriter
in interface URIConverter.Writeable
- Returns:
- a writer that provides access to the same underlying data as the input stream itself.
getEncoding
public String getEncoding()
- Description copied from interface:
URIConverter.Writeable
- Returns the encoding used to convert the writer's bytes to characters.
- Specified by:
getEncoding
in interface URIConverter.Writeable
- Returns:
- the encoding used to convert the writer's bytes to characters.
close
public void close()
throws IOException
- Throws:
IOException
flush
public void flush()
throws IOException
- Throws:
IOException