java.nio.IntBuffer
An int buffer.
1. Absolute and relative get and put methods that read and write single ints.
2. Absolute and relative bulk get methods that transfer contiguous sequences of ints from this buffer into an array.
3. Absolute and Relative bulk put methods that transfer contiguous sequences of ints from an int array or some other int buffer into this buffer.
4. A method for compacting an int buffer.
Some of the Methods of IntBuffer class.
isReadOnly(): This method tells whether or not this buffer is read-only.
limit(): This method returns this buffer's limit.
limit(int): his method sets this buffer's limit.
mark(): This method sets this buffer's mark at its position.
mismatch(IntBuffer): This method finds and returns the relative index of the first mismatch between this buffer and a given buffer.
order(): This method retrieves this buffer's byte order.
position(): This method returns this buffer's position.
position(int): This method sets this buffer's position.
put(int): This method writes the given int into this buffer at the current position and then increments the position.
put(int[]): This method transfers the entire content of the given source int array into this buffer.
put(IntBuffer): This method transfers the ints remaining in the given source buffer into this buffer.
put(int, int): This method writes the given int into this buffer at the given index.
put(int, int[]): This method copies ints into this buffer from the given source array.
put(int[], int, int): This method transfers ints into this buffer from the given source array.
put(int, int[], int, int): This method transfers length ints from the given array, starting at the given offset in the array and at the given index in this buffer.
remaining(): This method returns the number of elements between the current position and the limit.
reset(): This method resets this buffer's position to the previously-marked position.
rewind(): This method rewinds this buffer.
slice(): This method creates a new int buffer whose content is a shared subsequence of this buffer's content.
slice(int, int): This method creates a new int buffer whose content is a shared subsequence of this buffer's content. The content of the new buffer will start at the position index in this buffer and will contain length elements.
toString(): This method returns a string summarizing the state of this buffer.
IntBuffer.wrap(int[]): This method wraps an int array into a buffer.
IntBuffer.wrap(int[], int, int): This method wraps an int array into a buffer.
Some more Methods of IntBuffer
No comments:
Post a Comment