Package org.apache.abdera.i18n.text.io

Examples of org.apache.abdera.i18n.text.io.RewindableInputStream


    }

    @Test
    public void testRewindableInputStream() throws Exception {
        ByteArrayInputStream in = new ByteArrayInputStream(new byte[] {0x01, 0x02, 0x03, 0x04});
        RewindableInputStream ris = new RewindableInputStream(in);
        byte[] buf1 = new byte[4];
        byte[] buf2 = new byte[4];
        ris.read(buf1);
        ris.rewind();
        ris.read(buf2);
        for (int n = 0; n < 4; n++)
            assertEquals(buf2[n], buf1[n]);
    }
View Full Code Here


  }
 
  @Test
  public void testRewindableInputStream() throws Exception {
    ByteArrayInputStream in = new ByteArrayInputStream(new byte[] {0x01,0x02,0x03,0x04});
    RewindableInputStream ris = new RewindableInputStream(in);
    byte[] buf1 = new byte[4];
    byte[] buf2 = new byte[4];
    ris.read(buf1);
    ris.rewind();
    ris.read(buf2);
    for (int n = 0; n < 4; n++)
      assertEquals(buf1[n],buf2[n]);
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.i18n.text.io.RewindableInputStream

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.