## 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.

Nested Class Summary
`protected class` `URIConverter.WriteableOutputStream.Buffer`

Field Summary
`protected URIConverter.WriteableOutputStream.Buffer` `buffer`
`protected java.lang.String` `encoding`
`protected java.io.Writer` `writer`

Constructor Summary
`URIConverter.WriteableOutputStream(java.io.Writer writer, java.lang.String encoding)`

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`

Field Detail

### encoding

    protected java.lang.String encoding

### writer

    protected java.io.Writer writer

### buffer

    protected URIConverter.WriteableOutputStream.Buffer buffer

Constructor Detail

### URIConverter.WriteableOutputStream

    public URIConverter.WriteableOutputStream(java.io.Writer writer,
                                              java.lang.String encoding)

Method Detail

### 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`

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