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

The following examples show how to use javax.sql.rowset.serial.SerialBlob#getBinaryStream() . 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-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test19() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    sb.free();
    SerialBlob sb2 = (SerialBlob) sb.clone();
    InputStream is = sb2.getBinaryStream(1, 3);
}
 
Example 2
Source File: SerialBlobTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test25() throws Exception {
    byte[] expected = bytes;
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream();
    for (byte b : expected) {
        byte val = (byte) is.read();
        assertTrue(b == val, val + " does not match " + b);
    }
}
 
Example 3
Source File: SerialBlobTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test11() throws Exception {
    byte[] expected = new byte[]{1, 2, 3};
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(1, 3);
    for (byte b : expected) {
        byte val = (byte) is.read();
        assertTrue(b == val, val + " does not match " + b);
    }
}
 
Example 4
Source File: SerialBlobTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test19() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    sb.free();
    SerialBlob sb2 = (SerialBlob) sb.clone();
    InputStream is = sb2.getBinaryStream(1, 3);
}
 
Example 5
Source File: SerialBlobTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test25() throws Exception {
    byte[] expected = bytes;
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream();
    for (byte b : expected) {
        byte val = (byte) is.read();
        assertTrue(b == val, val + " does not match " + b);
    }
}
 
Example 6
Source File: SerialBlobTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test11() throws Exception {
    byte[] expected = new byte[]{1, 2, 3};
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(1, 3);
    for (byte b : expected) {
        byte val = (byte) is.read();
        assertTrue(b == val, val + " does not match " + b);
    }
}
 
Example 7
Source File: SerialBlobTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test19() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    sb.free();
    SerialBlob sb2 = (SerialBlob) sb.clone();
    InputStream is = sb2.getBinaryStream(1, 3);
}
 
Example 8
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 test01() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream();
}
 
Example 9
Source File: SerialBlobTests.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test02() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream(1, 5);
}
 
Example 10
Source File: SerialBlobTests.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test13() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(0, 3);
}
 
Example 11
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 test01() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream();
}
 
Example 12
Source File: SerialBlobTests.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test02() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream(1, 5);
}
 
Example 13
Source File: SerialBlobTests.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test17() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(bytes.length + 2, 6);
}
 
Example 14
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 test12() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(-1, 3);
}
 
Example 15
Source File: SerialBlobTests.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test16() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(1, 6);
}
 
Example 16
Source File: SerialBlobTests.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test15() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(1, 0);
}
 
Example 17
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 test15() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(1, 0);
}
 
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 test13() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(0, 3);
}
 
Example 19
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 test12() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(-1, 3);
}
 
Example 20
Source File: SerialBlobTests.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SerialException.class)
public void test01() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream();
}