ZSTR extends CharArray implements ASCII, ValueType<byte[]> { @Override public String toString() { String result = new String(getBytes(), StandardCharsets.US_ASCII); if (result.indexOf(NUL) != -1) { result = result.substring(0, result.indexOf(NUL)); } return result; } ZSTR(final int length);  ZSTR(final int length, final boolean allocate);  ZSTR(final String s); @Override void set(byte[] value); @Override byte[] get(); @Override String toString();  }
@Test public final void helloWorld() { final String expected = "Hello World!"; ZSTR zString = new ZSTR(expected); Assert.assertEquals(expected, zString.toString()); }