de.netseeker.ejoe.io
Class ByteBufferOutputStream
java.lang.Object
java.io.OutputStream
de.netseeker.ejoe.io.ByteBufferOutputStream
- public class ByteBufferOutputStream
- extends java.io.OutputStream
Implements an input stream for a NIO ByteBuffer. This class is based on an
article found at the homepage of Michael W. Spille.
- Author:
- Michael W. Spille, netseeker aka Michael Manske
Method Summary |
void |
close()
|
void |
flush()
|
java.nio.ByteBuffer |
getBackingBuffer()
|
void |
reset()
Reset the underlying byte buffer back to the starting state |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteBufferOutputStream
public ByteBufferOutputStream()
ByteBufferOutputStream
public ByteBufferOutputStream(int startingSize)
- Parameters:
startingSize
-
ByteBufferOutputStream
public ByteBufferOutputStream(java.nio.ByteBuffer buffer)
- Parameters:
buffer
-
reset
public void reset()
- Reset the underlying byte buffer back to the starting state
getBackingBuffer
public java.nio.ByteBuffer getBackingBuffer()
- Returns:
write
public void write(int b)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
flush
public void flush()
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2005-2006 netseeker. All Rights Reserved.