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 LazyFileInputStream  view LazyFileInputStream download LazyFileInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.hp.hpl.jena.shared.wg.LazyInputStream
          extended bycom.hp.hpl.jena.shared.wg.LazyFileInputStream
All Implemented Interfaces:
java.io.Closeable

class LazyFileInputStream
extends LazyInputStream

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.lang.String name
           
 
Constructor Summary
(package private) LazyFileInputStream(java.lang.String name)
          Creates new LazyZipEntryInputStream
 
Method Summary
 void close()
          This method closes the stream.
(package private)  boolean connect()
           
(package private)  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

name

private java.lang.String name
Constructor Detail

LazyFileInputStream

LazyFileInputStream(java.lang.String name)
Creates new LazyZipEntryInputStream

Method Detail

open

java.io.InputStream open()
                   throws java.io.IOException
Specified by:
open in class LazyInputStream

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.