de.grogra.pf.io
Interface InputStreamSource

All Superinterfaces:
FilterSource, RegistryContext
All Known Implementing Classes:
FileSource, GUnzipFilter, InputStreamSourceImpl, LazyFilter, NullSource, StreamAdapter

public interface InputStreamSource
extends FilterSource

This subinterface of FilterSource has to be implemented by filter sources whose flavor supports InputStreams (IOFlavor.INPUT_STREAM). It represents the data by an instance of InputStream, i.e., as a stream of bytes.

Author:
Ole Kniemeyer

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V>
 
Field Summary
 
Fields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URL
 
Method Summary
 java.io.InputStream getInputStream()
          Returns a stream to obtain the data as a stream of bytes.
 long length()
          Returns the total number of bytes of this stream.
 
Methods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, getSystemId, initProgressMonitor, setMetaData, setProgress
 
Methods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
 

Method Detail

getInputStream

java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns a stream to obtain the data as a stream of bytes.

Returns:
an input stream for the data
Throws:
java.io.IOException

length

long length()
Returns the total number of bytes of this stream. A negative values indicates that this number is unknown.

Returns:
number of bytes