Java IO Tutorial - Java ShortBuffer.order()








Syntax

ShortBuffer.order() has the following syntax.

public abstract ByteOrder order()

Example

In the following code shows how to use ShortBuffer.order() method.

import java.nio.ShortBuffer;
/*  w  ww  .j av a2  s .co  m*/
public class Main {
  public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short)100);
    System.out.println(bb.order());

  }
}

The code above generates the following result.