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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglength()Creates anInputStreamthat reads from the underlying buffer.toString()voidwrite(byte[] b, int off, int len) voidwrite(int b) voidwriteTo(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:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
length
public long length() -
toString
-
writeTo
Writes the contents of this buffer to another OutputStream.- Throws:
IOException
-
newInputStream
Creates anInputStreamthat reads from the underlying buffer.
-