当前位置: 首页>>代码示例>>Java>>正文


Java SerialBlob.getBinaryStream方法代码示例

本文整理汇总了Java中javax.sql.rowset.serial.SerialBlob.getBinaryStream方法的典型用法代码示例。如果您正苦于以下问题:Java SerialBlob.getBinaryStream方法的具体用法?Java SerialBlob.getBinaryStream怎么用?Java SerialBlob.getBinaryStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.sql.rowset.serial.SerialBlob的用法示例。


在下文中一共展示了SerialBlob.getBinaryStream方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test11

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@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);
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:11,代码来源:SerialBlobTests.java

示例2: test19

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@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);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:8,代码来源:SerialBlobTests.java

示例3: test25

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@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);
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:11,代码来源:SerialBlobTests.java

示例4: test01

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test01() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream();
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:7,代码来源:SerialBlobTests.java

示例5: test02

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test02() throws Exception {
    SerialBlob sb = new SerialBlob(new StubBlob());
    sb.free();
    sb.getBinaryStream(1, 5);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:7,代码来源:SerialBlobTests.java

示例6: test12

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test12() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(-1, 3);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:SerialBlobTests.java

示例7: test13

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test13() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(0, 3);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:SerialBlobTests.java

示例8: test14

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test14() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(0, 3);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:SerialBlobTests.java

示例9: test15

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test15() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(1, 0);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:SerialBlobTests.java

示例10: test16

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test16() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(1, 6);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:SerialBlobTests.java

示例11: test17

import javax.sql.rowset.serial.SerialBlob; //导入方法依赖的package包/类
@Test(expectedExceptions = SerialException.class)
public void test17() throws Exception {
    SerialBlob sb = new SerialBlob(bytes);
    InputStream is = sb.getBinaryStream(bytes.length + 2, 6);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:SerialBlobTests.java


注:本文中的javax.sql.rowset.serial.SerialBlob.getBinaryStream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。