The Encog Project

org.encog.bot.spider
Class SpiderInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.encog.bot.spider.SpiderInputStream
All Implemented Interfaces:
java.io.Closeable

public class SpiderInputStream
extends java.io.InputStream

This class is used by the spider to both parse and save an InputStream.


Constructor Summary
SpiderInputStream(java.io.InputStream is, java.io.OutputStream os)
          Construct the SpiderInputStream.
 
Method Summary
 int read()
          Read a single byte from the stream.
 void setOutputStream(java.io.OutputStream os)
          Set the OutputStream.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpiderInputStream

public SpiderInputStream(java.io.InputStream is,
                         java.io.OutputStream os)
Construct the SpiderInputStream. Whatever is read from the InputStream will also be written to the OutputStream.

Parameters:
is - The InputStream.
os - The OutputStream.
Method Detail

read

public int read()
         throws java.io.IOException
Read a single byte from the stream. @throws IOException If an I/O exception occurs.

Specified by:
read in class java.io.InputStream
Returns:
The character that was read from the stream.
Throws:
java.io.IOException

setOutputStream

public void setOutputStream(java.io.OutputStream os)
Set the OutputStream.

Parameters:
os - The OutputStream.

The Encog Project