本文整理汇总了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);
}