@Test public void testSubSequence() { assertEquals(0, abs.subSequence(0, 0).length()); assertEquals("mile", abs.subSequence(1, 5).toString()); }
@Override public ByteSequence subSequence(int start, int end) { if (start > end || start < 0 || end > length) { throw new IllegalArgumentException("Bad start and/end start = " + start + " end=" + end + " offset=" + offset + " length=" + length); } return new ArrayByteSequence(data, offset + start, end - start); }
ArrayByteSequence extends ByteSequence implements Serializable { @Override public ByteSequence subSequence(int start, int end) { if (start > end || start < 0 || end > length) { throw new IllegalArgumentException("Bad start and/end start = " + start + " end=" + end + " offset=" + offset + " length=" + length); } return new ArrayByteSequence(data, offset + start, end - start); } }
ArrayByteSequence extends ByteSequence implements Serializable { @Override public ByteSequence subSequence(int start, int end) { if (start > end || start < 0 || end > length) { throw new IllegalArgumentException("Bad start and/end start = " + start + " end=" + end + " offset=" + offset + " length=" + length); } return new ArrayByteSequence(data, offset + start, end - start); } ArrayByteSequence(byte[] data);  ArrayByteSequence(byte[] data, int offset, int length);  ArrayByteSequence(String s);  ArrayByteSequence(ByteBuffer buffer);  ArrayByteSequence(ByteSequence byteSequence); }
ArrayByteSequence extends ByteSequence implements Serializable { @Override public ByteSequence subSequence(int start, int end) { if (start > end || start < 0 || end > length) { throw new IllegalArgumentException("Bad start and/end start = " + start + " end=" + end + " offset=" + offset + " length=" + length); } return new ArrayByteSequence(data, offset + start, end - start); } ArrayByteSequence(byte[] data);  ArrayByteSequence(byte[] data, int offset, int length);  ArrayByteSequence(String s);  ArrayByteSequence(ByteBuffer buffer);  ArrayByteSequence(ByteSequence byteSequence); @Override byte byteAt(int i); @Override byte[] getBackingArray(); @Override boolean isBackedByArray(); @Override int length(); @Override int offset(); @Override ByteSequence subSequence(int start, int end); @Override byte[] toArray(); @Override String toString(); }
ArrayByteSequence extends ByteSequence implements Serializable { @Override public ByteSequence subSequence(int start, int end) { if (start > end || start < 0 || end > length) { throw new IllegalArgumentException("Bad start and/end start = " + start + " end=" + end + " offset=" + offset + " length=" + length); } return new ArrayByteSequence(data, offset + start, end - start); } ArrayByteSequence(byte[] data);  ArrayByteSequence(byte[] data, int offset, int length);  ArrayByteSequence(String s);  ArrayByteSequence(ByteBuffer buffer);  ArrayByteSequence(ByteSequence byteSequence); @Override byte byteAt(int i); @Override byte[] getBackingArray(); @Override boolean isBackedByArray(); @Override int length(); @Override int offset(); @Override ByteSequence subSequence(int start, int end); @Override byte[] toArray(); @Override String toString();  }