Package org.cip4.jdflib.util
Class ByteArrayIOStream.ByteArrayIOInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.ByteArrayInputStream
-
- org.cip4.jdflib.util.ByteArrayIOStream.ByteArrayIOInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
ByteArrayIOFileStream.ByteArrayIOFileInputStream,SkipInputStream
- Enclosing class:
- ByteArrayIOStream
public static class ByteArrayIOStream.ByteArrayIOInputStream extends java.io.ByteArrayInputStreambytearrayinputstream that allows duplication without copying
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedByteArrayIOInputStream(byte[] buf, int count)ByteArrayIOInputStream(byte[] buf, int offset, int length)protectedByteArrayIOInputStream(java.io.InputStream is)creates an input output stream class from any stream if is already is a buffered inputstream, no copy is made
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringasString(int maxLen)byte[]getBuf()longgetCount()ByteArrayIOStream.ByteArrayIOInputStreamgetNewStream()get a new input stream that starts at posvoidseek(long pos)longtell()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ByteArrayIOInputStream
public ByteArrayIOInputStream(byte[] buf, int offset, int length)- Parameters:
buf-offset-length-
-
ByteArrayIOInputStream
protected ByteArrayIOInputStream(byte[] buf, int count)- Parameters:
buf-count-
-
ByteArrayIOInputStream
protected ByteArrayIOInputStream(java.io.InputStream is)
creates an input output stream class from any stream if is already is a buffered inputstream, no copy is made- Parameters:
is- the inputstream to buffer
-
-
Method Detail
-
seek
public void seek(long pos)
- Parameters:
pos-
-
tell
public long tell()
- Returns:
-
getNewStream
public ByteArrayIOStream.ByteArrayIOInputStream getNewStream()
get a new input stream that starts at pos- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
getBuf
public byte[] getBuf()
- Returns:
-
getCount
public long getCount()
- Returns:
-
asString
public java.lang.String asString(int maxLen)
-
-