本文整理匯總了Java中javax.sql.rowset.serial.SerialBlob.position方法的典型用法代碼示例。如果您正苦於以下問題:Java SerialBlob.position方法的具體用法?Java SerialBlob.position怎麽用?Java SerialBlob.position使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.sql.rowset.serial.SerialBlob
的用法示例。
在下文中一共展示了SerialBlob.position方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: test30
import javax.sql.rowset.serial.SerialBlob; //導入方法依賴的package包/類
@Test
public void test30() throws Exception {
long expectedPos = 3; // starting offset is 1 vs 0
byte[] pattern = new byte[]{6, 8};
SerialBlob sb = new SerialBlob(new StubBlob());
long pos = sb.position(pattern, 2);
assertEquals(pos, expectedPos);
}
示例2: test27
import javax.sql.rowset.serial.SerialBlob; //導入方法依賴的package包/類
@Test
public void test27() throws Exception {
long expectedPos = 3; // starting offset is 1 vs 0
byte[] pattern = new byte[]{3, 4};
SerialBlob sb = new SerialBlob(bytes);
long pos = sb.position(pattern, 1);
assertEquals(pos, expectedPos);
}
示例3: test28
import javax.sql.rowset.serial.SerialBlob; //導入方法依賴的package包/類
@Test
public void test28() throws Exception {
long expectedPos = 3; // starting offset is 1 vs 0
byte[] pattern = new byte[]{3, 4, 5};
SerialBlob sb = new SerialBlob(bytes);
long pos = sb.position(pattern, 2);
assertEquals(pos, expectedPos);
}
示例4: test29
import javax.sql.rowset.serial.SerialBlob; //導入方法依賴的package包/類
@Test
public void test29() throws Exception {
long expectedPos = 2; // starting offset is 1 vs 0
byte[] pattern = new byte[]{4, 6};
SerialBlob sb = new SerialBlob(new StubBlob());
long pos = sb.position(pattern, 1);
assertEquals(pos, expectedPos);
}
示例5: test05
import javax.sql.rowset.serial.SerialBlob; //導入方法依賴的package包/類
@Test(expectedExceptions = SerialException.class)
public void test05() throws Exception {
SerialBlob sb = new SerialBlob(new StubBlob());
sb.free();
sb.position(new byte[5], 1);
}
示例6: test06
import javax.sql.rowset.serial.SerialBlob; //導入方法依賴的package包/類
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
SerialBlob sb = new SerialBlob(new StubBlob());
sb.free();
sb.position(new StubBlob(), 1);
}