ariba.util.io
Class UnicodeEscapeInputStreamReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.InputStreamReader
          extended by ariba.util.io.UnicodeEscapeInputStreamReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class UnicodeEscapeInputStreamReader
extends java.io.InputStreamReader

UnicodeEscapeInputStreamReader is a special inputStreamWriter to read from the underlying input stream and convert the data into UnicodeEscaped (Ariba's internal encoding scheme) format. This is used internally by our stubgenerator, should not be used elsewhere.


Constructor Summary
UnicodeEscapeInputStreamReader(java.io.InputStream in)
          Create an InputStreamReader that uses internal Ariba encoding.
UnicodeEscapeInputStreamReader(java.io.InputStream in, java.lang.String enc)
          Constructor: we don't support this constructor.
 
Method Summary
 void close()
          Close the stream.
 java.lang.String getEncoding()
          Returns the canonical name of the character encoding being used by this stream.
 int read(char[] cbuf, int off, int len)
          Read characters into a portion of an array.
 boolean ready()
          Tell whether this stream is ready to be read.
 
Methods inherited from class java.io.InputStreamReader
read
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnicodeEscapeInputStreamReader

public UnicodeEscapeInputStreamReader(java.io.InputStream in)
Create an InputStreamReader that uses internal Ariba encoding.

Parameters:
in - An InputStream, must not be null.

UnicodeEscapeInputStreamReader

public UnicodeEscapeInputStreamReader(java.io.InputStream in,
                                      java.lang.String enc)
                               throws java.io.UnsupportedEncodingException
Constructor: we don't support this constructor. It will assert.

Parameters:
in - An InputStream
enc - The encoding
Throws:
java.io.UnsupportedEncodingException - If the named encoding is not supported
Method Detail

getEncoding

public java.lang.String getEncoding()
Returns the canonical name of the character encoding being used by this stream. Note that for this class, the Ariba internal UnicodeEscape encoding is used.

Overrides:
getEncoding in class java.io.InputStreamReader
Returns:
a String representing the encoding name.

read

public int read(char[] cbuf,
                int off,
                int len)
         throws java.io.IOException
Read characters into a portion of an array.

Overrides:
read in class java.io.InputStreamReader
Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
java.io.IOException - If an I/O error occurs

ready

public boolean ready()
              throws java.io.IOException
Tell whether this stream is ready to be read. An InputStreamReader is ready if its input buffer is not empty, or if bytes are available to be read from the underlying byte stream.

Overrides:
ready in class java.io.InputStreamReader
Throws:
java.io.IOException - If an I/O error occurs

close

public void close()
           throws java.io.IOException
Close the stream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStreamReader
Throws:
java.io.IOException - If an I/O error occurs


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.