Java Examples

The following examples show how to use 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 Project: j2objc   Author: google   File:    License: Apache License 2.0 5 votes vote down vote up
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