public static byte[] readNullTerminatedBytes(byte[] data, int index) {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        for (int i = index; i < data.length; i++) {
            byte item = data[i];
            if (item == MSC.NULL_TERMINATED_STRING_DELIMITER) {
                break;
            }
            out.write(item);
        }
        return out.toByteArray();
    }
@Test
	public void testReadNullTerminatedBytes() {
		Assert.assertArrayEquals(new byte[] {},
			ByteHelper.readNullTerminatedBytes(new byte[] {0}, 0));
		Assert.assertArrayEquals(new byte[] {8},
			ByteHelper.readNullTerminatedBytes(new byte[] {8}, 0));
	}