當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。