if (pos < 1 || pos > this.length()) { throw new SerialException("Invalid position in BLOB object set");
if (pos < 1 || pos > this.length()) { throw new SerialException("Invalid position in BLOB object set");
@Test public void testReferencePersistence() throws Exception { String testString = "this is test clob"; //$NON-NLS-1$ SerialBlob blob = new SerialBlob(testString.getBytes()); BlobType bv = new BlobType(blob); bv.setReferenceStreamId(null); // now force to serialize BlobType read = UnitTestUtil.helpSerialize(bv); assertNull(read.getReferenceStreamId()); assertEquals(testString, new String(read.getBytes(1, (int)blob.length()))); }