Class TestableByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- com.google.api.client.testing.util.TestableByteArrayOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
closed
Whether the output stream has been closed.
-
Constructor Summary
Constructors Constructor Description TestableByteArrayOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
byte[]
getBuffer()
Returns the written buffer value as a modifiable byte array.boolean
isClosed()
Returns whether the output stream has been closed.
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
Overriding is supported, but overriding method must call the super implementation.
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.ByteArrayOutputStream
- Throws:
java.io.IOException
-
getBuffer
public final byte[] getBuffer()
Returns the written buffer value as a modifiable byte array.
-
isClosed
public final boolean isClosed()
Returns whether the output stream has been closed.
-
-