|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.io.ChannelOutputDestination
public class ChannelOutputDestination
Output destination backed by a WritableByteChannel.
| Field Summary | |
|---|---|
protected WritableByteChannel |
channel
The backing WritableByteChannel. |
| Constructor Summary | |
|---|---|
ChannelOutputDestination(WritableByteChannel channel)
Initialize this output destination with the specified SocketWrapper. |
|
| Method Summary | |
|---|---|
void |
close()
This method does nothing. |
int |
write(byte[] data,
int offset,
int len)
Write data to this output destination from an array of bytes. |
int |
write(ByteBuffer data)
Write data to this output destination from a byte buffer. |
void |
writeInt(int value)
Write an int value to this output destination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected WritableByteChannel channel
WritableByteChannel.
| Constructor Detail |
|---|
public ChannelOutputDestination(WritableByteChannel channel)
SocketWrapper.
channel - the backing SocketWrapper.| Method Detail |
|---|
public int write(byte[] data,
int offset,
int len)
throws Exception
write in interface OutputDestinationdata - the buffer containing the data to write.offset - the position in the buffer where to start reading the data.len - the size in bytes of the data to write.
Exception - if an IO error occurs.OutputDestination.write(byte[], int, int)
public int write(ByteBuffer data)
throws Exception
write in interface OutputDestinationdata - the buffer containing the data to write.
Exception - if an IO error occurs.OutputDestination.write(java.nio.ByteBuffer)
public void writeInt(int value)
throws Exception
writeInt in interface OutputDestinationvalue - the value to write.
Exception - if an IO error occurs.OutputDestination.writeInt(int)
public void close()
throws IOException
close in interface CloseableIOException - if an IO error occurs.Closeable.close()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||