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

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

Field Summary
`protected URIConverter.ReadableInputStream.Buffer` `buffer`
`protected java.lang.String` `encoding`
`protected java.io.Reader` `reader`

Constructor Summary
`URIConverter.ReadableInputStream(java.io.Reader reader, java.lang.String encoding)`
`URIConverter.ReadableInputStream(java.lang.String xmlString)`
`URIConverter.ReadableInputStream(java.lang.String string, java.lang.String encoding)`

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

Field Detail

### encoding

    protected java.lang.String encoding

### reader

    protected java.io.Reader reader

### buffer

    protected URIConverter.ReadableInputStream.Buffer buffer

Constructor Detail

### URIConverter.ReadableInputStream

    public URIConverter.ReadableInputStream(java.io.Reader reader,
                                            java.lang.String encoding)

### URIConverter.ReadableInputStream

    public URIConverter.ReadableInputStream(java.lang.String string,
                                            java.lang.String encoding)

### URIConverter.ReadableInputStream

    public URIConverter.ReadableInputStream(java.lang.String xmlString)

Method Detail

### getEncoding

    public static java.lang.String getEncoding(java.lang.String xmlString)

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

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