Class ChannelBufferByteOutput
- java.lang.Object
-
- org.jboss.netty.handler.codec.marshalling.ChannelBufferByteOutput
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable,org.jboss.marshalling.ByteOutput
class ChannelBufferByteOutput extends java.lang.Object implements org.jboss.marshalling.ByteOutputByteOutputimplementation which writes the data to aChannelBuffer
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelBufferbuffer
-
Constructor Summary
Constructors Constructor Description ChannelBufferByteOutput(ChannelBuffer buffer)Create a new instance which use the givenChannelBufferChannelBufferByteOutput(ChannelBufferFactory factory, int estimatedLength)CallsChannelBufferByteOutput(ChannelBuffer)with a dynamicChannelBuffer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()ChannelBuffergetBuffer()Return theChannelBufferwhich contains the written contentvoidwrite(byte[] bytes)voidwrite(byte[] bytes, int srcIndex, int length)voidwrite(int b)
-
-
-
Field Detail
-
buffer
private final ChannelBuffer buffer
-
-
Constructor Detail
-
ChannelBufferByteOutput
public ChannelBufferByteOutput(ChannelBuffer buffer)
Create a new instance which use the givenChannelBuffer
-
ChannelBufferByteOutput
public ChannelBufferByteOutput(ChannelBufferFactory factory, int estimatedLength)
CallsChannelBufferByteOutput(ChannelBuffer)with a dynamicChannelBuffer
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Throws:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein interfaceorg.jboss.marshalling.ByteOutput- Throws:
java.io.IOException
-
write
public void write(byte[] bytes) throws java.io.IOException- Specified by:
writein interfaceorg.jboss.marshalling.ByteOutput- Throws:
java.io.IOException
-
write
public void write(byte[] bytes, int srcIndex, int length) throws java.io.IOException- Specified by:
writein interfaceorg.jboss.marshalling.ByteOutput- Throws:
java.io.IOException
-
getBuffer
public ChannelBuffer getBuffer()
Return theChannelBufferwhich contains the written content
-
-