List of usage examples for java.nio CharBuffer rewind
public final Buffer rewind()
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put(2, 'j'); cb1.rewind(); System.out.println(cb1.get(2)); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put(2, 'j'); cb1.rewind(); System.out.println(cb1.length()); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put(2, 'j'); cb1.rewind(); System.out.println(cb1.order()); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put(2, 'j'); cb1.rewind(); System.out.println(Arrays.toString(cb1.array())); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.append('j'); cb1.rewind(); System.out.println(Arrays.toString(cb1.array())); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put(2, 'j'); cb1.rewind(); System.out.println(cb1.get()); System.out.println(cb1.get()); System.out.println(cb1.get()); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put("java2s.com"); cb1.rewind(); System.out.println(cb1.toString()); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put(2, 'j'); cb1.rewind(); char[] charArray = new char[5]; cb1.get(charArray, 0, 2);/*from w ww .j a va 2 s.c o m*/ System.out.println(Arrays.toString(charArray)); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.put(2, 'j'); cb1.rewind(); char[] charArray = new char[5]; cb1.get(charArray);//from w w w .j a v a 2 s. c om System.out.println(Arrays.toString(charArray)); }
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(50); cb1.append("java2s.com"); cb1.rewind(); System.out.println(cb1.hasArray()); }