/** * Returns the position in this <code>SerialBlob</code> object where * the given <code>Blob</code> object begins, starting the search at the * specified position. * * @param pattern the <code>Blob</code> object for which to search; * @param start the position of the byte in this * <code>SerialBlob</code> object from which to begin * the search; the first position is <code>1</code>; * must not be less than <code>1</code> nor greater than * the length of this <code>SerialBlob</code> object * @return the position in this <code>SerialBlob</code> object * where the given <code>Blob</code> object begins, starting * at the specified position; <code>-1</code> if the pattern is * not found or the given starting position is out of bounds; * position numbering for the return value starts at <code>1</code> * @throws SerialException if an error occurs when serializing the blob; * if {@code free} had previously been called on this object * @throws SQLException if there is an error accessing the <code>BLOB</code> * value from the database */ public long position(Blob pattern, long start) throws SerialException, SQLException { isValid(); return position(pattern.getBytes(1, (int)(pattern.length())), start); }