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

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.eclipse.emf.ecore.resource.URIConverter.ReadableInputStream
All Implemented Interfaces:
URIConverter.Readable
Enclosing class:
URIConverter

public static class URIConverter.ReadableInputStream
extends 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  String encoding
           
protected  Reader reader
           
 
Constructor Summary
URIConverter.ReadableInputStream(Reader reader, String encoding)
           
URIConverter.ReadableInputStream(String xmlString)
           
URIConverter.ReadableInputStream(String string, String encoding)
           
 
Method Summary
 Reader asReader()
          Returns a reader that provides access to the same underlying data as the input stream itself.
 void close()
           
 String getEncoding()
          Returns the encoding used to convert the reader's characters to bytes.
static String getEncoding(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 String encoding

reader

protected Reader reader

buffer

protected URIConverter.ReadableInputStream.Buffer buffer
Constructor Detail

URIConverter.ReadableInputStream

public URIConverter.ReadableInputStream(Reader reader,
                                        String encoding)

URIConverter.ReadableInputStream

public URIConverter.ReadableInputStream(String string,
                                        String encoding)

URIConverter.ReadableInputStream

public URIConverter.ReadableInputStream(String xmlString)
Method Detail

getEncoding

public static String getEncoding(String xmlString)

read

public int read()
         throws IOException
Throws:
IOException

asReader

public 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 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 IOException
Throws:
IOException

reset

public void reset()
           throws IOException
Throws:
IOException

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