org.eclipse.emf.ecore.resource
Class URIConverter.WriteableOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.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.


Nested Class Summary
protected  class URIConverter.WriteableOutputStream.Buffer
           
 
Field Summary
protected  URIConverter.WriteableOutputStream.Buffer buffer
           
protected  String encoding
           
protected  Writer writer
           
 
Constructor Summary
URIConverter.WriteableOutputStream(Writer writer, String encoding)
           
 
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.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encoding

protected String encoding

writer

protected Writer writer

buffer

protected URIConverter.WriteableOutputStream.Buffer buffer
Constructor Detail

URIConverter.WriteableOutputStream

public URIConverter.WriteableOutputStream(Writer writer,
                                          String encoding)
Method Detail

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

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.