/** * Returns a byte array containing the bytes from the <code>List</code>. * The <code>List</code> must contain <code>Byte</code> objects. * <code>null</code> entries in the <code>List</code> are * allowed, the resulting byte will be 0. * @param data the <code>List</code> * @return the resulting byte array */ public static byte[] getByteArrayFromList(List data) { return getByteArrayFromList(data, 0); }
/** * Returns a byte array containing the bytes from the <code>List</code>. * The <code>List</code> must contain <code>Byte</code> objects. * <code>null</code> entries in the <code>List</code> are * allowed, the resulting byte will be 0. * @param data the <code>List</code> * @return the resulting byte array */ public static byte[] getByteArrayFromList(List data) { return getByteArrayFromList(data, 0); }
/** * Returns a byte array containing the bytes from the <code>List</code>. * The <code>List</code> must contain <code>Byte</code> objects. * <code>null</code> entries in the <code>List</code> are * allowed, the resulting byte will be 0. * @param data the <code>List</code> * @param index the index at which to start * @return the resulting byte array */ public static byte[] getByteArrayFromList(List data, int index) { return getByteArrayFromList(data, index, data.size() - index); }
/** * Returns a byte array containing the bytes from the <code>List</code>. * The <code>List</code> must contain <code>Byte</code> objects. * <code>null</code> entries in the <code>List</code> are * allowed, the resulting byte will be 0. * @param data the <code>List</code> * @param index the index at which to start * @return the resulting byte array */ public static byte[] getByteArrayFromList(List data, int index) { return getByteArrayFromList(data, index, data.size() - index); }
public InputStream getBinaryStream() throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } return new ByteArrayInputStream(ArrayUtil.getByteArrayFromList(blobData)); }
public InputStream getBinaryStream() throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } return new ByteArrayInputStream(ArrayUtil.getByteArrayFromList(blobData)); }
public InputStream getBinaryStream() throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } return new ByteArrayInputStream(ArrayUtil.getByteArrayFromList(blobData)); }
public long position(byte[] pattern, long start) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } byte[] data = ArrayUtil.getByteArrayFromList(blobData); int index = ArrayUtil.indexOf(data, pattern, (int)(start - 1)); if(-1 != index) index += 1; return index; }
public long position(byte[] pattern, long start) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } byte[] data = ArrayUtil.getByteArrayFromList(blobData); int index = ArrayUtil.indexOf(data, pattern, (int)(start - 1)); if(-1 != index) index += 1; return index; }
public byte[] getBytes(long pos, int length) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } length = verifyAndFixLength(pos, length); return ArrayUtil.getByteArrayFromList(blobData, (int)(pos - 1), length); }
public byte[] getBytes(long pos, int length) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } length = verifyAndFixLength(pos, length); return ArrayUtil.getByteArrayFromList(blobData, (int)(pos - 1), length); }
public InputStream getBinaryStream(long pos, long length) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } length = verifyAndFixLength(pos, (int)length); return new ByteArrayInputStream(ArrayUtil.getByteArrayFromList(blobData, (int)(pos - 1), (int)length)); }
public long position(byte[] pattern, long start) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } byte[] data = ArrayUtil.getByteArrayFromList(blobData); int index = ArrayUtil.indexOf(data, pattern, (int)(start - 1)); if(-1 != index) index += 1; return index; }
public byte[] getBytes(long pos, int length) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } length = verifyAndFixLength(pos, length); return ArrayUtil.getByteArrayFromList(blobData, (int)(pos - 1), length); }
public InputStream getBinaryStream(long pos, long length) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } length = verifyAndFixLength(pos, (int)length); return new ByteArrayInputStream(ArrayUtil.getByteArrayFromList(blobData, (int)(pos - 1), (int)length)); }
public InputStream getBinaryStream(long pos, long length) throws SQLException { if(wasFreeCalled) { throw new SQLException("free() was called"); } length = verifyAndFixLength(pos, (int)length); return new ByteArrayInputStream(ArrayUtil.getByteArrayFromList(blobData, (int)(pos - 1), (int)length)); }