StandardBlob implements Blob { @Override public long length() { assertNotFreed(); return len; } StandardBlob(byte[] buf); @Override long length(); @Override byte[] getBytes(final long posOrdinal, final int length); @Override InputStream getBinaryStream(); @Override long position(byte[] pattern, long startOrdinal); @Override long position(Blob pattern, long start); @Override int setBytes(long pos, byte[] bytes); @Override int setBytes(long posOrdinal, byte[] bytes, int offset, int length); @Override OutputStream setBinaryStream(long pos); @Override void truncate(long length); @Override void free(); @Override InputStream getBinaryStream(long pos, long length);  }
@Test void getBlobLength() throws SQLException { assertEquals(BYTES.length, standardBlob.length()); }