FileDocCategorySizeDatePackage
Test.javaAPI DocExample570Mon Feb 11 20:31:08 GMT 2002com.ronsoft.books.nio.buffers

Test

public class Test extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		ByteBuffer bb = ByteBuffer.allocate (100);

		bb.mark();
		bb.position(5);
		bb.reset();

		bb.mark().position(5).reset();

		char [] myBuffer = new char [100];

		CharBuffer cb = CharBuffer.wrap (myBuffer);
		cb.position(12).limit(21);

		CharBuffer sliced = cb.slice();

		System.out.println ("Sliced: offset=" + sliced.arrayOffset()
			+ ", capacity=" + sliced.capacity());