public class Base64InputStreamTest extends Object
Constructor and Description |
---|
Base64InputStreamTest() |
Modifier and Type | Method and Description |
---|---|
void |
testAvailable()
Tests skipping past the end of a stream.
|
void |
testBase64EmptyInputStreamMimeChuckSize()
Tests the Base64InputStream implementation against empty input.
|
void |
testBase64EmptyInputStreamPemChuckSize()
Tests the Base64InputStream implementation against empty input.
|
void |
testBase64InputStreamByChunk()
Tests the Base64InputStream implementation.
|
void |
testBase64InputStreamByteByByte()
Tests the Base64InputStream implementation.
|
void |
testCodec101()
Test for the CODEC-101 bug: InputStream.read(byte[]) should never return 0 because Java's builtin InputStreamReader hates that.
|
void |
testCodec105()
Tests the bug reported in CODEC-105.
|
void |
testCodec130()
Tests the problem reported in CODEC-130.
|
void |
testCodec98NPE()
Test the Base64InputStream implementation against the special NPE inducing input identified in the CODEC-98 bug.
|
void |
testInputStreamReader()
Another test for the CODEC-101 bug: In commons-codec-1.4 this test shows InputStreamReader explicitly hating an
InputStream.read(byte[]) return of 0:
java.io.IOException: Underlying input stream returned zero bytes at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:268) at
sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at
java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.fill(BufferedReader.java:136) at
java.io.BufferedReader.readLine(BufferedReader.java:299) at java.io.BufferedReader.readLine(BufferedReader.java:362) at
org.apache.commons.codec.binary.Base64InputStreamTest.testInputStreamReader(Base64InputStreamTest.java:75)
But in commons-codec-1.5 it's fixed.
|
void |
testMarkSupported()
Tests markSupported.
|
void |
testRead0()
Tests read returning 0
|
void |
testReadNull()
Tests read with null.
|
void |
testReadOutOfBounds()
Tests read throwing IndexOutOfBoundsException
|
void |
testSkipBig()
Tests skipping number of characters larger than the internal buffer.
|
void |
testSkipNone()
Tests skipping as a noop
|
void |
testSkipPastEnd()
Tests skipping past the end of a stream.
|
void |
testSkipToEnd()
Tests skipping to the end of a stream.
|
void |
testSkipWrongArgument()
Tests if negative arguments to skip are handled correctly.
|
public Base64InputStreamTest()
public void testCodec130() throws IOException
IOException
public void testCodec105() throws IOException
IOException
public void testCodec101() throws Exception
Exception
- for some failure scenarios.public void testInputStreamReader() throws Exception
Exception
- for some failure scenarios.public void testCodec98NPE() throws Exception
Exception
- for some failure scenarios.public void testAvailable() throws Throwable
Throwable
public void testBase64EmptyInputStreamMimeChuckSize() throws Exception
Exception
- for some failure scenarios.public void testBase64EmptyInputStreamPemChuckSize() throws Exception
Exception
- for some failure scenarios.public void testBase64InputStreamByChunk() throws Exception
Exception
- for some failure scenarios.public void testBase64InputStreamByteByByte() throws Exception
Exception
- for some failure scenarios.public void testMarkSupported() throws Exception
Exception
public void testReadNull() throws Exception
Exception
- for some failure scenarios.public void testReadOutOfBounds() throws Exception
Exception
public void testSkipBig() throws Throwable
Throwable
public void testSkipNone() throws Throwable
Throwable
public void testSkipPastEnd() throws Throwable
Throwable
public void testSkipToEnd() throws Throwable
Throwable
public void testSkipWrongArgument() throws Throwable
Throwable
Copyright © 2002–2013 The Apache Software Foundation. All rights reserved.