FileDocCategorySizeDatePackage
ByteArrayInputStreamTest.javaAPI DocAndroid 1.5 API1593Wed May 06 22:42:02 BST 2009android.core

ByteArrayInputStreamTest

public class ByteArrayInputStreamTest extends TestCase
Tests to verify that simple functionality works for ByteArrayInputStreams.

Fields Summary
Constructors Summary
Methods Summary
public voidtestByteArrayInputStream()

        String str = "AbCdEfGhIjKlMnOpQrStUvWxYz";

        ByteArrayInputStream a = new ByteArrayInputStream(str.getBytes());
        ByteArrayInputStream b = new ByteArrayInputStream(str.getBytes());
        ByteArrayInputStream c = new ByteArrayInputStream(str.getBytes());
        ByteArrayInputStream d = new ByteArrayInputStream(str.getBytes());

        assertEquals(str, IOUtil.read(a));
        assertEquals("AbCdEfGhIj", IOUtil.read(b, 10));
        assertEquals("bdfhjlnprtvxz", IOUtil.skipRead(c));
        assertEquals("AbCdEfGdEfGhIjKlMnOpQrStUvWxYz", IOUtil.markRead(d, 3, 4));