java类java.io.LineNumberInputStream的实例源码

OldLineNumberInputStreamTest.java 文件源码 项目:j2objc 阅读 20 收藏 0 点赞 0 评论 0
protected void setUp() {
    /*
     * In order for IOException to be thrown in reset(),the inputStream to
     * the constructor cannot be a byteArrayInputstream because the reset()
     * in byteArrayInputStream does not throw IOException. When
     * BufferedInputStream is used, the size of the buffer must be smaller
     * than the readlimit in mark inorder for IOException to be thrown
     */
    BufferedInputStream buftemp = new BufferedInputStream(
            new ByteArrayInputStream(text.getBytes()), 4);
    lnis = new LineNumberInputStream(buftemp);
    lnis2 = new LineNumberInputStream(new ByteArrayInputStream(dosText
            .getBytes()));
}
LineNumberInputStreamTest.java 文件源码 项目:In-the-Box-Fork 阅读 23 收藏 0 点赞 0 评论 0
protected void setUp() {
    /*
     * In order for IOException to be thrown in reset(),the inputStream to
     * the constructor cannot be a byteArrayInputstream because the reset()
     * in byteArrayInputStream does not throw IOException. When
     * BufferedInputStream is used, the size of the buffer must be smaller
     * than the readlimit in mark inorder for IOException to be thrown
     */
    BufferedInputStream buftemp = new BufferedInputStream(
            new ByteArrayInputStream(text.getBytes()), 4);
    lnis = new LineNumberInputStream(buftemp);
    lnis2 = new LineNumberInputStream(new ByteArrayInputStream(dosText
            .getBytes()));
}
LineNumberInputStreamTest.java 文件源码 项目:cn1 阅读 25 收藏 0 点赞 0 评论 0
/**
 * Sets up the fixture, for example, open a network connection. This method
 * is called before a test is executed.
 */
protected void setUp() throws UnsupportedEncodingException {
    /*
     * In order for IOException to be thrown in reset(),the inputStream to
     * the constructor cannot be a byteArrayInputstream because the reset()
     * in byteArrayInputStream does not throw IOException. When
     * BufferedInputStream is used, the size of the buffer must be smaller
     * than the readlimit in mark inorder for IOException to be thrown
     */
    BufferedInputStream buftemp = new BufferedInputStream(
            new ByteArrayInputStream(text.getBytes("UTF-8")), 4);
    lnis = new LineNumberInputStream(buftemp);
    lnis2 = new LineNumberInputStream(new ByteArrayInputStream(dosText
            .getBytes("UTF-8")));
}
LineNumberInputStreamTest.java 文件源码 项目:freeVM 阅读 21 收藏 0 点赞 0 评论 0
/**
 * Sets up the fixture, for example, open a network connection. This method
 * is called before a test is executed.
 */
protected void setUp() {
    /*
     * In order for IOException to be thrown in reset(),the inputStream to
     * the constructor cannot be a byteArrayInputstream because the reset()
     * in byteArrayInputStream does not throw IOException. When
     * BufferedInputStream is used, the size of the buffer must be smaller
     * than the readlimit in mark inorder for IOException to be thrown
     */
    BufferedInputStream buftemp = new BufferedInputStream(
            new ByteArrayInputStream(text.getBytes()), 4);
    lnis = new LineNumberInputStream(buftemp);
    lnis2 = new LineNumberInputStream(new ByteArrayInputStream(dosText
            .getBytes()));
}
LineNumberInputStreamTest.java 文件源码 项目:freeVM 阅读 20 收藏 0 点赞 0 评论 0
/**
 * Sets up the fixture, for example, open a network connection. This method
 * is called before a test is executed.
 */
protected void setUp() throws UnsupportedEncodingException {
    /*
     * In order for IOException to be thrown in reset(),the inputStream to
     * the constructor cannot be a byteArrayInputstream because the reset()
     * in byteArrayInputStream does not throw IOException. When
     * BufferedInputStream is used, the size of the buffer must be smaller
     * than the readlimit in mark inorder for IOException to be thrown
     */
    BufferedInputStream buftemp = new BufferedInputStream(
            new ByteArrayInputStream(text.getBytes("UTF-8")), 4);
    lnis = new LineNumberInputStream(buftemp);
    lnis2 = new LineNumberInputStream(new ByteArrayInputStream(dosText
            .getBytes("UTF-8")));
}
FilterInputStreamNullSourceTest.java 文件源码 项目:j2objc 阅读 28 收藏 0 点赞 0 评论 0
public void testLineNumberInputStream() throws IOException {
    assertReadsFailWithNullPointerException(new LineNumberInputStream(null));
}
FilterInputStreamNullSourceTest.java 文件源码 项目:In-the-Box-Fork 阅读 18 收藏 0 点赞 0 评论 0
public void testLineNumberInputStream() throws IOException {
    assertReadsFailWithNullPointerException(new LineNumberInputStream(null));
}


问题


面经


文章

微信
公众号

扫码关注公众号