Java Code Examples for javax.sql.rowset.serial.SerialBlob#position()

The following examples show how to use javax.sql.rowset.serial.SerialBlob#position() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SerialBlobTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 2
Source File: SerialBlobTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 3
Source File: SerialBlobTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 4
Source File: SerialBlobTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 5
Source File: SerialBlobTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 6
Source File: SerialBlobTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 7
Source File: SerialBlobTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 8
Source File: SerialBlobTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 9
Source File: SerialBlobTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 10
Source File: SerialBlobTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 11
Source File: SerialBlobTests.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 12
Source File: SerialBlobTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 13
Source File: SerialBlobTests.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 14
Source File: SerialBlobTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@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);
}
 
Example 15
Source File: SerialBlobTests.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.position(new StubBlob(), 1);
}
 
Example 16
Source File: SerialBlobTests.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.position(new StubBlob(), 1);
}
 
Example 17
Source File: SerialBlobTests.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test05() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.position(new byte[5], 1);
}
 
Example 18
Source File: SerialBlobTests.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.position(new StubBlob(), 1);
}
 
Example 19
Source File: SerialBlobTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.position(new StubBlob(), 1);
}
 
Example 20
Source File: SerialBlobTests.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test06() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.position(new StubBlob(), 1);
}