org.eclipse.emf.ecore.resource
Class URIConverter.WriteableOutputStream
java.lang.Object
java.io.OutputStream
org.eclipse.emf.ecore.resource.URIConverter.WriteableOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, URIConverter.Writeable
- Enclosing interface:
- URIConverter
public static class URIConverter.WriteableOutputStream
- extends java.io.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 |
java.io.Writer |
asWriter()
Returns a writer that provides access to the same underlying data as the input stream itself. |
void |
close()
|
void |
flush()
|
java.lang.String |
getEncoding()
Returns the encoding used to convert the writer's bytes to characters. |
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encoding
protected java.lang.String encoding
writer
protected java.io.Writer writer
buffer
protected URIConverter.WriteableOutputStream.Buffer buffer
URIConverter.WriteableOutputStream
public URIConverter.WriteableOutputStream(java.io.Writer writer,
java.lang.String encoding)
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
asWriter
public java.io.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 java.lang.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 java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.OutputStream
- Throws:
java.io.IOException