net.officefloor.plugin.stream.inputstream
Class BrowsableInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by net.officefloor.plugin.stream.inputstream.BrowsableInputStream
All Implemented Interfaces:
Closeable

public class BrowsableInputStream
extends InputStream

Provides ability to browse an InputStream.

Author:
Daniel Sagenschneider

Constructor Summary
BrowsableInputStream(InputStream input, int dataBufferCapacity, Object mutex)
          Initiate.
 
Method Summary
 int available()
           
 void close()
           
 InputStream createBrowser()
          Creates browse InputStream to content.
 int read()
           
 
Methods inherited from class java.io.InputStream
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

BrowsableInputStream

public BrowsableInputStream(InputStream input,
                            int dataBufferCapacity,
                            Object mutex)
Initiate.

Parameters:
input - InputStream.
dataBufferCapacity - Capacity for each DataBuffer.
mutex - Mutex to synchronise on.
Method Detail

createBrowser

public InputStream createBrowser()
Creates browse InputStream to content.

Returns:
Browse InputStream.

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException


Copyright © 2005-2012. All Rights Reserved.