Package org.kohsuke.stapler.framework.io
Class ByteBuffer
java.lang.Object
java.io.OutputStream
org.kohsuke.stapler.framework.io.ByteBuffer
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
ByteArrayOutputStream
re-implementation.
This version allows one to read while writing is in progress.
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
length()
Creates anInputStream
that reads from the underlying buffer.toString()
void
write
(byte[] b, int off, int len) void
write
(int b) void
writeTo
(OutputStream os) Writes the contents of this buffer to another OutputStream.Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write
-
Constructor Details
-
ByteBuffer
public ByteBuffer()
-
-
Method Details
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
length
public long length() -
toString
-
writeTo
Writes the contents of this buffer to another OutputStream.- Throws:
IOException
-
newInputStream
Creates anInputStream
that reads from the underlying buffer.
-