bb.io
Class StreamUtil.Drainer

java.lang.Object
  extended by bb.io.StreamUtil.Drainer
All Implemented Interfaces:
Runnable
Enclosing class:
StreamUtil

private static class StreamUtil.Drainer
extends Object
implements Runnable

Solely used by the internal worker thread of the above drain method.


Field Summary
private  byte[] bytes
           
private  InputStream in
           
private  long instanceId
           
private static AtomicLong instanceIdNext
           
private  int lengthMax
           
private  Throwable throwable
           
 
Constructor Summary
private StreamUtil.Drainer(InputStream in, int lengthMax)
           
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instanceIdNext

private static final AtomicLong instanceIdNext

instanceId

private final long instanceId

in

private final InputStream in

lengthMax

private final int lengthMax

bytes

private volatile byte[] bytes

throwable

private volatile Throwable throwable
Constructor Detail

StreamUtil.Drainer

private StreamUtil.Drainer(InputStream in,
                           int lengthMax)
                    throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

run

public void run()
Specified by:
run in interface Runnable