IT. Expert System.

Android Reference

GatheringByteChannel


java.nio.channels

Interface GatheringByteChannel

    • Method Summary

      Methods
      Modifier and Type Method and Description
      long write(ByteBuffer[] buffers)
      Writes bytes from all the given buffers to a channel.
      long write(ByteBuffer[] buffers, int offset, int length)
      Attempts to write all remaining() bytes from length byte buffers, in order, starting at buffers[offset].
    • Method Detail

      • write

        long write(ByteBuffer[] buffers)
                   throws IOException
        Writes bytes from all the given buffers to a channel.

        This method is equivalent to: write(buffers, 0, buffers.length);

        Parameters:
        buffers - the buffers containing bytes to be written.
        Returns:
        the number of bytes actually written.
        Throws:
        AsynchronousCloseException - if the channel is closed by another thread during this write operation.
        ClosedByInterruptException - if another thread interrupts the calling thread while the operation is in progress. The interrupt state of the calling thread is set and the channel is closed.
        ClosedChannelException - if the channel is closed.
        IndexOutOfBoundsException - if offset < 0 or length < 0, or if offset + length is greater than the size of buffers.
        IOException - if another I/O error occurs; details are in the message.
        NonWritableChannelException - if the channel has not been opened in a mode that permits writing.
      • write

        long write(ByteBuffer[] buffers,
                 int offset,
                 int length)
                   throws IOException
        Attempts to write all remaining() bytes from length byte buffers, in order, starting at buffers[offset]. The number of bytes actually written is returned.

        If a write operation is in progress, subsequent threads will block until the write is completed and then contend for the ability to write.

        Parameters:
        buffers - the array of byte buffers that is the source for bytes written to the channel.
        offset - the index of the first buffer in buffers to get bytes from.
        length - the number of buffers to get bytes from.
        Returns:
        the number of bytes actually written.
        Throws:
        AsynchronousCloseException - if the channel is closed by another thread during this write operation.
        ClosedByInterruptException - if another thread interrupts the calling thread while the operation is in progress. The interrupt state of the calling thread is set and the channel is closed.
        ClosedChannelException - if the channel is closed.
        IndexOutOfBoundsException - if offset < 0 or length < 0, or if offset + length is greater than the size of buffers.
        IOException - if another I/O error occurs; details are in the message.
        NonWritableChannelException - if the channel was not opened for writing.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 357 / 248377562. Delta: 0.01952 с