Package org.apache.beam.sdk.util
Class ExposedByteArrayInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.ByteArrayInputStream
-
- org.apache.beam.sdk.util.ExposedByteArrayInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
@Internal public class ExposedByteArrayInputStream extends java.io.ByteArrayInputStream
ByteArrayInputStream
that allows accessing the entire internal buffer without copying.
-
-
Constructor Summary
Constructors Constructor Description ExposedByteArrayInputStream(byte[] buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
byte[]
readAll()
Read all remaining bytes.
-
-
-
Method Detail
-
readAll
public byte[] readAll() throws java.io.IOException
Read all remaining bytes.- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.ByteArrayInputStream
-
-