info.informatica.io
Class LimitedInputFactory

java.lang.Object
  extended by info.informatica.io.LimitedInputFactory

public final class LimitedInputFactory
extends Object

Factory class for LimitedInputStream and LimitedReader objects.

In addition to the per-Stream limits, allows to put a global limit on the amount of bytes read.

Version:
1.01
Author:
amengual at informatica dot info

Field Summary
 boolean parar
           
 
Constructor Summary
LimitedInputFactory()
          Creates a LimitedInputFactory with the default global limit of 64 GB.
LimitedInputFactory(long max_global_size)
          Creates a LimitedInputFactory with the specified global limit.
 
Method Summary
 long getBytesTransferred()
           
 LimitedInputStream getLimitedInputStream(InputStream is)
           
 LimitedReader getLimitedReader(Reader re)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parar

public boolean parar
Constructor Detail

LimitedInputFactory

public LimitedInputFactory()
Creates a LimitedInputFactory with the default global limit of 64 GB.


LimitedInputFactory

public LimitedInputFactory(long max_global_size)
Creates a LimitedInputFactory with the specified global limit.

Parameters:
max_global_size - the max global limit allowed to be read by all factory streams, in bytes.
Method Detail

getLimitedInputStream

public LimitedInputStream getLimitedInputStream(InputStream is)

getLimitedReader

public LimitedReader getLimitedReader(Reader re)

getBytesTransferred

public long getBytesTransferred()