org.kohsuke.stapler.framework.io
Class ByteBuffer
java.lang.Object
java.io.OutputStream
org.kohsuke.stapler.framework.io.ByteBuffer
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class ByteBuffer
- extends java.io.OutputStream
ByteArrayOutputStream
re-implementation.
This version allows one to read while writing is in progress.
- Author:
- Kohsuke Kawaguchi
Method Summary |
long |
length()
|
java.io.InputStream |
newInputStream()
Creates an InputStream that reads from the underlying buffer. |
java.lang.String |
toString()
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
void |
writeTo(java.io.OutputStream os)
Writes the contents of this buffer to another OutputStream. |
Methods inherited from class java.io.OutputStream |
close, flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ByteBuffer
public ByteBuffer()
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
length
public long length()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
writeTo
public void writeTo(java.io.OutputStream os)
throws java.io.IOException
- Writes the contents of this buffer to another OutputStream.
- Throws:
java.io.IOException
newInputStream
public java.io.InputStream newInputStream()
- Creates an
InputStream
that reads from the underlying buffer.
Copyright © 2011. All Rights Reserved.