Example usage for java.nio Buffer limit

List of usage examples for java.nio Buffer limit

Introduction

In this page you can find the example usage for java.nio Buffer limit.

Prototype

int limit

To view the source code for java.nio Buffer limit.

Click Source Link

Document

limit - 1 is the last element that can be read or written.

Usage

From source file:Main.java

private static void println(Buffer buffer) {
    System.out.println("pos=" + buffer.position() + ", limit=" + buffer.limit() + ", capacity="
            + buffer.capacity() + ": '" + buffer.toString() + "'");
}