Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.2K+ articles
Java
10.8K+ articles
Misc
8.8K+ articles
Java-Functions
4.2K+ articles
Java - util package
1.6K+ articles
Java-NIO package
230+ articles
Java-ByteBuffer
45 posts
Recent Articles
Popular Articles
ByteBuffer putChar() methods in Java with Examples
Last Updated: 24 June 2019
putChar(char value)The putChar(char value) method of java.nio.ByteBuffer Class is used to write two bytes containing the given char value, in the current byte order, into ...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer putDouble() methods in Java with Examples
Last Updated: 17 January 2023
putDouble(double value)The putDouble(double value) method of java.nio.ByteBuffer Class is used to write eight bytes containing the given double value, in the current byte ...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer putInt() methods in Java with Examples
Last Updated: 19 January 2023
putInt(int value)The putInt(int value) method of java.nio.ByteBuffer Class is used to write four bytes containing the given int value, in the current byte order, into this...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer putLong() methods in Java with Examples
Last Updated: 06 February 2023
putLong(int value)The putLong(int value) method of java.nio.ByteBuffer Class is used to write eight bytes containing the given long value, in the current byte order, into ...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer putShort() methods in Java with Examples
Last Updated: 08 February 2023
putShort(int value)The putShort(int value) method of java.nio.ByteBuffer Class is used to write two bytes containing the given short value, in the current byte order, into...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer wrap() methods in Java with Examples
Last Updated: 05 November 2019
wrap(byte[] array)The wrap() method of java.nio.ByteBuffer Class is used to wraps a byte array into a buffer. The new buffer will be backed by the given byte array, i.e., ...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer mark() methods in Java with Examples
Last Updated: 27 June 2019
The mark() method of java.nio.ByteBuffer Class is used to set this buffer's mark at its position.Syntax:public ByteBuffer mark()Return Value: This method returns this buff...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer clear() methods in Java with Examples
Last Updated: 27 June 2019
The clear() method of java.nio.ByteBuffer Class is used to clear this buffer. The position is set to zero, the limit is set to the capacity, and the mark is discarded. Inv...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer flip() methods in Java with Examples
Last Updated: 27 June 2019
The flip() method of java.nio.ByteBuffer Class is used to flip this buffer. The limit is set to the current position and then the position is set to zero. If the mark is d...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer limit() methods in Java with Examples
Last Updated: 19 January 2023
The limit() method of java.nio.ByteBuffer Class is used to set this buffer's limit. If the position is larger than the new limit then it is set to the new limit. If the ma...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer isDirect() methods in Java with Examples
Last Updated: 27 June 2019
The isDirect() method of java.nio.ByteBuffer Class is used to tell whether or not this byte buffer is direct.Syntax:public abstract boolean isDirect()Return Value: This me...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer position() methods in Java with Examples
Last Updated: 27 June 2019
The position(int newPosition) method of java.nio.ByteBuffer Class is used to Sets this buffer's position. If the mark is defined and larger than the new position then it i...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer reset() methods in Java with Examples
Last Updated: 16 July 2019
The reset() method of java.nio.ByteBuffer Class is used to reset this buffer's position to the previously-marked position. Invoking this method neither changes nor discard...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
ByteBuffer rewind() methods in Java with Examples
Last Updated: 16 July 2019
The rewind() method of java.nio.ByteBuffer Class is used to rewind this buffer. The position is set to zero and the mark is discarded. Invoke this method before a sequence...
read more
Java
Java-Functions
Java-NIO package
Java-ByteBuffer
java.nio.ByteBuffer Class in Java
Last Updated: 29 March 2021
ByteBuffer holds a sequence of integer values to be used in an I/O operation. The ByteBuffer class provides the following four categories of operations upon long buffers:A...
read more
Java
Picked
Java-NIO package
Java-ByteBuffer
1
2
3
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !