UnsyncByteArrayOutputStream extends OutputStream { public int size() { return _index; } UnsyncByteArrayOutputStream();  UnsyncByteArrayOutputStream(int size); void reset(); int size(); byte[] toByteArray(); @Override String toString(); String toString(String charsetName); byte[] unsafeGetByteArray(); ByteBuffer unsafeGetByteBuffer(); @Override void write(byte[] bytes); @Override void write(byte[] bytes, int offset, int length); @Override void write(int b); void writeTo(OutputStream outputStream);  }
@Test public void testConstructor() { new BoundaryCheckerUtil(); Assert.assertTrue( Modifier.isPackage(BoundaryCheckerUtil.class.getModifiers())); UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream(); Assert.assertEquals(0, unsyncByteArrayOutputStream.size()); unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream(64); Assert.assertEquals(0, unsyncByteArrayOutputStream.size()); }