Package org.analogweb.core
Class DefaultWritableBuffer
- java.lang.Object
-
- org.analogweb.core.DefaultWritableBuffer
-
- All Implemented Interfaces:
WritableBuffer
public class DefaultWritableBuffer extends Object implements WritableBuffer
- Author:
- y2k2mt
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WritableByteChannel
asChannel()
OutputStream
asOutputStream()
WritableBuffer
from(ReadableBuffer readable)
protected WritableByteChannel
getChannel()
static WritableBuffer
writeBuffer(OutputStream out)
static WritableBuffer
writeBuffer(WritableByteChannel c)
static WritableBuffer
writeBuffer(WritableByteChannel c, long length)
WritableBuffer
writeBytes(byte[] bytes)
WritableBuffer
writeBytes(byte[] bytes, int index, int length)
WritableBuffer
writeBytes(ByteBuffer buffer)
-
-
-
Method Detail
-
writeBuffer
public static WritableBuffer writeBuffer(OutputStream out)
-
writeBuffer
public static WritableBuffer writeBuffer(WritableByteChannel c)
-
writeBuffer
public static WritableBuffer writeBuffer(WritableByteChannel c, long length)
-
getChannel
protected WritableByteChannel getChannel()
-
writeBytes
public WritableBuffer writeBytes(byte[] bytes) throws IOException
- Specified by:
writeBytes
in interfaceWritableBuffer
- Throws:
IOException
-
writeBytes
public WritableBuffer writeBytes(byte[] bytes, int index, int length) throws IOException
- Specified by:
writeBytes
in interfaceWritableBuffer
- Throws:
IOException
-
writeBytes
public WritableBuffer writeBytes(ByteBuffer buffer) throws IOException
- Specified by:
writeBytes
in interfaceWritableBuffer
- Throws:
IOException
-
asOutputStream
public OutputStream asOutputStream() throws IOException
- Specified by:
asOutputStream
in interfaceWritableBuffer
- Throws:
IOException
-
asChannel
public WritableByteChannel asChannel() throws IOException
- Specified by:
asChannel
in interfaceWritableBuffer
- Throws:
IOException
-
from
public WritableBuffer from(ReadableBuffer readable) throws IOException
- Specified by:
from
in interfaceWritableBuffer
- Throws:
IOException
-
-