Exemplo n.º 1
0
  @Test
  public void testRead() throws Exception {
    String[] s = IoUtil.readLines(new StringReader("abc \n\n xyz "), true);
    assertArrayEquals2(new String[] {"abc", "xyz"}, s);

    ByteArrayInputStream in = new ByteArrayInputStream("abc".getBytes());
    assertEquals(3, IoUtil.read(in, new byte[4], 0, 4));
  }