Package hudson.util
Class ByteArrayOutputStream2
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- hudson.util.ByteArrayOutputStream2
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class ByteArrayOutputStream2 extends ByteArrayOutputStream
ByteArrayOutputStream
with access to its raw buffer.- Since:
- 1.349
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Constructor Description ByteArrayOutputStream2()
ByteArrayOutputStream2(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBuffer()
void
readFrom(InputStream is)
Reads the givenInputStream
completely into the buffer.-
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Method Detail
-
getBuffer
public byte[] getBuffer()
-
readFrom
public void readFrom(InputStream is) throws IOException
Reads the givenInputStream
completely into the buffer.- Throws:
IOException
-
-