Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hp.hpl.jena.shared.wg
Class LazyInputStream  view LazyInputStream download LazyInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.hp.hpl.jena.shared.wg.LazyInputStream
All Implemented Interfaces:
java.io.Closeable
Direct Known Subclasses:
LazyFileInputStream, LazyURLInputStream, LazyZipEntryInputStream

abstract class LazyInputStream
extends java.io.InputStream

In test cases we cannot open all the input files while creating the test suite, but must defer the opening until the test is actually run.


Field Summary
private  java.io.InputStream underlying
           
 
Constructor Summary
(package private) LazyInputStream()
           
 
Method Summary
 void close()
          This method closes the stream.
(package private)  boolean connect()
           
(package private) abstract  java.io.InputStream open()
           
 int read()
          This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

underlying

private java.io.InputStream underlying
Constructor Detail

LazyInputStream

LazyInputStream()
Method Detail

open

abstract java.io.InputStream open()
                           throws java.io.IOException

connect

boolean connect()
          throws java.io.IOException

read

public int read()
         throws java.io.IOException
Description copied from class: java.io.InputStream
This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255. This method also will return -1 if the end of the stream has been reached.

This method will block until the byte can be read.


close

public void close()
           throws java.io.IOException
Description copied from class: java.io.InputStream
This method closes the stream. Any futher attempts to read from the stream may generate an IOException

This method does nothing in this class, but subclasses may override this method in order to provide additional functionality.