Package org.ajax4jsf.io

Examples of org.ajax4jsf.io.CharBuffer


            stream.write(i);
        }

        assertEquals(255, stream.getLength());

        CharBuffer firstBuffer = stream.getFirstBuffer();

        assertNull(firstBuffer.getNext());
        assertNull(firstBuffer.getPrevious());
        stream.reset();
        assertEquals(0, stream.getLength());
        firstBuffer = stream.getFirstBuffer();
        assertEquals(0, firstBuffer.getUsedSize());
        assertNull(firstBuffer.getNext());
        assertNull(firstBuffer.getPrevious());
    }
View Full Code Here


            stream.write(i);
        }

        assertEquals(257, stream.getLength());

        CharBuffer firstBuffer = stream.getFirstBuffer();

        assertNotNull(firstBuffer.getNext());
        assertNull(firstBuffer.getPrevious());
        stream.reset();
        assertEquals(0, stream.getLength());
        firstBuffer = stream.getFirstBuffer();
        assertEquals(0, firstBuffer.getUsedSize());
        assertNull(firstBuffer.getNext());
        assertNull(firstBuffer.getPrevious());
    }
View Full Code Here

            writer.write(i);
        }

        writer.close();

        CharBuffer firstBuffer = writer.getFirstBuffer();

        assertNotNull(firstBuffer);

        CharBuffer nextBuffer = firstBuffer.getNext();

        assertNotNull(nextBuffer);
        assertNull(nextBuffer.getNext());
        assertTrue(firstBuffer.getUsedSize() == firstBuffer.getCacheSize());
        assertTrue(nextBuffer.getUsedSize() < nextBuffer.getCacheSize());
        firstBuffer.compact();
        assertTrue(firstBuffer.getUsedSize() == firstBuffer.getCacheSize());
        assertTrue(nextBuffer.getUsedSize() == nextBuffer.getCacheSize());

        FastBufferReader reader = new FastBufferReader(firstBuffer);

        for (int i = 0; i < itemsTowWrite; i++) {
            assertEquals(i, reader.read());
View Full Code Here

    for (int i = 0; i < 255; i++) {
      stream.write(i);
    }
   
    assertEquals(255, stream.getLength());
    CharBuffer firstBuffer = stream.getFirstBuffer();
    assertNull(firstBuffer.getNext());
    assertNull(firstBuffer.getPrevious());

    stream.reset();
   
    assertEquals(0, stream.getLength());
    firstBuffer = stream.getFirstBuffer();
    assertEquals(0, firstBuffer.getUsedSize());
    assertNull(firstBuffer.getNext());
    assertNull(firstBuffer.getPrevious());
  }
View Full Code Here

    for (int i = 0; i < 257; i++) {
      stream.write(i);
    }

    assertEquals(257, stream.getLength());
    CharBuffer firstBuffer = stream.getFirstBuffer();
    assertNotNull(firstBuffer.getNext());
    assertNull(firstBuffer.getPrevious());

    stream.reset();
   
    assertEquals(0, stream.getLength());
    firstBuffer = stream.getFirstBuffer();
    assertEquals(0, firstBuffer.getUsedSize());
    assertNull(firstBuffer.getNext());
    assertNull(firstBuffer.getPrevious());
  }
View Full Code Here

TOP

Related Classes of org.ajax4jsf.io.CharBuffer

Copyright © 2018 www.massapicom. 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.