| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

public interface IDataSink
A data sink is an I/O resource capable of receiving data.
| Method Summary | |
|---|---|
|  long | transferFrom(FileChannel source)transfer the data of the source file channel to this data sink | 
|  long | transferFrom(ReadableByteChannel source)transfer the data of the source channel to this data sink by using the default chunk size | 
|  long | transferFrom(ReadableByteChannel source,
             int chunkSize)transfer the data of the source channel to this data sink | 
|  int | write(byte... bytes)writes bytes to the data sink | 
|  int | write(byte b)writes a byte to the data sink | 
|  int | write(byte[] bytes,
      int offset,
      int length)writes bytes to the data sink | 
|  int | write(ByteBuffer buffer)see WritableByteChannel.write(ByteBuffer) | 
|  long | write(ByteBuffer[] buffers)see GatheringByteChannel.write(ByteBuffer[]) | 
|  long | write(ByteBuffer[] srcs,
      int offset,
      int length)see GatheringByteChannel.write(ByteBuffer[], int, int) | 
|  int | write(double d)writes a double to the data sink | 
|  int | write(int i)writes a int to the data sink | 
|  long | write(List<ByteBuffer> buffers)writes a list of bytes to the data sink | 
|  int | write(long l)writes a long to the data sink | 
|  int | write(short s)writes a short to the data sink | 
|  int | write(String message)writes a message | 
| Method Detail | 
|---|
int write(byte b)
          throws IOException,
                 BufferOverflowException
b - the byte to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(byte... bytes)
          throws IOException,
                 BufferOverflowException
bytes - the bytes to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(byte[] bytes,
          int offset,
          int length)
          throws IOException,
                 BufferOverflowException
bytes - the bytes to writeoffset - The offset of the sub array to be used; must be non-negative and no larger than array.length. The new buffer`s position will be set to this value.length - The length of the sub array to be used; must be non-negative and no larger than array.length - offset. The new buffer`s limit will be set to offset + length.
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(ByteBuffer buffer)
          throws IOException,
                 BufferOverflowException
WritableByteChannel.write(ByteBuffer)
IOException
BufferOverflowException
long write(ByteBuffer[] buffers)
           throws IOException,
                  BufferOverflowException
GatheringByteChannel.write(ByteBuffer[])
IOException
BufferOverflowException
long write(ByteBuffer[] srcs,
           int offset,
           int length)
           throws IOException
GatheringByteChannel.write(ByteBuffer[], int, int)
IOException
long write(List<ByteBuffer> buffers)
           throws IOException,
                  BufferOverflowException
buffers - the bytes to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(int i)
          throws IOException,
                 BufferOverflowException
i - the int value to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(short s)
          throws IOException,
                 BufferOverflowException
s - the short value to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(long l)
          throws IOException,
                 BufferOverflowException
l - the int value to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(double d)
          throws IOException,
                 BufferOverflowException
d - the int value to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
int write(String message)
          throws IOException,
                 BufferOverflowException
message - the message to write
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
long transferFrom(FileChannel source)
                  throws IOException,
                         BufferOverflowException
source - the source channel
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
long transferFrom(ReadableByteChannel source)
                  throws IOException,
                         BufferOverflowException
source - the source channel
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs
long transferFrom(ReadableByteChannel source,
                  int chunkSize)
                  throws IOException,
                         BufferOverflowException
source - the source channelchunkSize - the chunk size to use
BufferOverflowException - If the no enough space is available
IOException - If some other I/O error occurs| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||