satc
Class DocumentStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--satc.DocumentStream
Direct Known Subclasses:
SwingDocumentStream

public class DocumentStream
extends java.io.InputStream

Class to provide InputStream functionality from a portion of a Document.


Constructor Summary
DocumentStream()
           
 
Method Summary
 int read()
          Reads the next byte of data from this input stream.
 void reset()
           
 void setDocument(java.lang.Object doc)
           
 void setRange(int p0, int p1)
          Restrict the stream to a range of the document.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentStream

public DocumentStream()
Method Detail

setDocument

public void setDocument(java.lang.Object doc)

setRange

public void setRange(int p0,
                     int p1)
Restrict the stream to a range of the document.

read

public int read()
         throws java.io.IOException
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

A subclass must provide an implementation of this method.

Overrides:
read in class java.io.InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
java.io.IOException - if an I/O error occurs.

reset

public void reset()
Overrides:
reset in class java.io.InputStream