class ByteArrayProvider implements ByteProvider {

	@Override
	public byte[] readBytes(long index, long length) throws IOException {
		assertValidIndex(index, true);
		if (index + length > srcBytes.length) {
			throw new IOException("Attempt to read beyond end of byte data");
		}
		byte[] destBytes = new byte[(int) length];
		System.arraycopy(srcBytes, (int) index, destBytes, 0, (int) length);
		return destBytes;
	}

	public  ByteArrayProvider(byte[] bytes);
	public  ByteArrayProvider(String name, byte[] bytes);

}