Package java.nio

Examples of java.nio.CharBuffer.reset()


    assertEquals(buf.order(), readonly.order());
    assertEquals(buf.capacity(), readonly.capacity());
    assertContentEquals(buf, readonly);

    // readonly's position, mark, and limit should be independent to buf
    readonly.reset();
    assertEquals(readonly.position(), 0);
    readonly.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), 0);
View Full Code Here


    assertEquals(buf.order(), readonly.order());
    assertEquals(buf.capacity(), readonly.capacity());
    assertContentEquals(buf, readonly);

    // readonly's position, mark, and limit should be independent to buf
    readonly.reset();
    assertEquals(readonly.position(), originalPosition);
    readonly.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), originalPosition);
View Full Code Here

    assertEquals(buf.capacity(), duplicate.capacity());
    assertContentEquals(buf, duplicate);

    // duplicate's position, mark, and limit should be independent to
    // buf
    duplicate.reset();
    assertEquals(duplicate.position(), 0);
    duplicate.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), 0);
View Full Code Here

    assertEquals(buf.capacity(), duplicate.capacity());
    assertContentEquals(buf, duplicate);

    // duplicate's position, mark, and limit should be independent to
    // buf
    duplicate.reset();
    assertEquals(duplicate.position(), originalPosition);
    duplicate.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), originalPosition);
View Full Code Here

    assertEquals(buf.order(), slice.order());
    assertEquals(slice.position(), 0);
    assertEquals(slice.limit(), buf.remaining());
    assertEquals(slice.capacity(), buf.remaining());
    try {
      slice.reset();
      fail("Should throw Exception"); //$NON-NLS-1$
    } catch (InvalidMarkException e) {
      // expected
    }
View Full Code Here

    assertEquals(buf.order(), slice.order());
    assertEquals(slice.position(), 0);
    assertEquals(slice.limit(), buf.remaining());
    assertEquals(slice.capacity(), buf.remaining());
    try {
      slice.reset();
      fail("Should throw Exception"); //$NON-NLS-1$
    } catch (InvalidMarkException e) {
      // expected
    }
View Full Code Here

    assertEquals(buf.order(), readonly.order());
    assertEquals(buf.capacity(), readonly.capacity());
    assertContentEquals(buf, readonly);

    // readonly's position, mark, and limit should be independent to buf
    readonly.reset();
    assertEquals(readonly.position(), 0);
    readonly.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), 0);
View Full Code Here

    assertEquals(buf.order(), readonly.order());
    assertEquals(buf.capacity(), readonly.capacity());
    assertContentEquals(buf, readonly);

    // readonly's position, mark, and limit should be independent to buf
    readonly.reset();
    assertEquals(readonly.position(), originalPosition);
    readonly.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), originalPosition);
View Full Code Here

    assertEquals(buf.capacity(), duplicate.capacity());
    assertContentEquals(buf, duplicate);

    // duplicate's position, mark, and limit should be independent to
    // buf
    duplicate.reset();
    assertEquals(duplicate.position(), 0);
    duplicate.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), 0);
View Full Code Here

    assertEquals(buf.capacity(), duplicate.capacity());
    assertContentEquals(buf, duplicate);

    // duplicate's position, mark, and limit should be independent to
    // buf
    duplicate.reset();
    assertEquals(duplicate.position(), originalPosition);
    duplicate.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), originalPosition);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.