类java.io.LineNumberInputStream源码实例Demo

下面列出了怎么用java.io.LineNumberInputStream的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: j2objc   文件: OldLineNumberInputStreamTest.java
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()));
}
 
 类所在包
 类方法
 同包方法