"

2013 FRC Java API

"

com.sun.cldc.i18n
Class StreamReader

java.lang.Object
  extended by java.io.Reader
      extended by com.sun.cldc.i18n.StreamReader
Direct Known Subclasses:
ISO8859_1_Reader

public abstract class StreamReader
extends Reader

General prototype for character converting stream readers.

Version:
1.0 11/16/99, 1.1 05/24/01

Field Summary
 InputStream in
          Input stream to read from
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
StreamReader()
           
 
Method Summary
 void close()
          Close the stream.
 void mark(int readAheadLimit)
          Mark the present position in the stream.
 boolean markSupported()
          Tell whether this stream supports the mark() operation.
 Reader open(InputStream in, String enc)
          Open the reader
 boolean ready()
          Tell whether the underlying byte stream is ready to be read.
 void reset()
          Reset the stream.
abstract  int sizeOf(byte[] array, int offset, int length)
          Get the size in chars of an array of bytes
 
Methods inherited from class java.io.Reader
read, read, read, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

public InputStream in
Input stream to read from

Constructor Detail

StreamReader

public StreamReader()
Method Detail

open

public Reader open(InputStream in,
                   String enc)
            throws UnsupportedEncodingException
Open the reader

Throws:
UnsupportedEncodingException

ready

public boolean ready()
Tell whether the underlying byte stream is ready to be read. Return false for those streams that do not support available(), such as the Win32 console stream.

Overrides:
ready in class Reader
Returns:
True if the next read() is guaranteed not to block for input, false otherwise. Note that returning false does not guarantee that the next read will block.

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation.

Overrides:
markSupported in class Reader
Returns:
true if and only if this stream supports the mark operation.

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream.

Overrides:
mark in class Reader
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream may fail.
Throws:
IOException - If an I/O error occurs

reset

public void reset()
           throws IOException
Reset the stream.

Overrides:
reset in class Reader
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream.

Specified by:
close in class Reader
Throws:
IOException - If an I/O error occurs

sizeOf

public abstract int sizeOf(byte[] array,
                           int offset,
                           int length)
Get the size in chars of an array of bytes


"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"