org.duracloud.chunk.stream
Class KnownLengthInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream
          extended by org.duracloud.chunk.stream.KnownLengthInputStream
All Implemented Interfaces:
java.io.Closeable

public class KnownLengthInputStream
extends java.io.ByteArrayInputStream

This wraps ByteArrayInputStream and adds a length field.

Author:
Andrew Woods Date: Feb 10, 2010

Field Summary
 
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos
 
Constructor Summary
KnownLengthInputStream(java.lang.String content)
           
 
Method Summary
 int getLength()
           
 
Methods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnownLengthInputStream

public KnownLengthInputStream(java.lang.String content)
Method Detail

getLength

public int getLength()


Copyright © 2009-2010 DuraSpace. All Rights Reserved.