Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.batik.util
Class Base64Test  view Base64Test download Base64Test.java

java.lang.Object
  extended byorg.apache.batik.test.AbstractTest
      extended byorg.apache.batik.util.Base64Test
All Implemented Interfaces:
org.apache.batik.test.Test

public class Base64Test
extends org.apache.batik.test.AbstractTest

This test validates that the Base65 encoder/decoders work properly.

Version:
$Id: Base64Test.java,v 1.6 2004/08/18 07:17:15 vhardy Exp $

Nested Class Summary
(package private) static class Base64Test.StreamCopier
           
 
Field Summary
protected  java.lang.String action
           
static java.lang.String ENTRY_KEY_ERROR_DESCRIPTION
           
static java.lang.String ERROR_BAD_ACTION_STRING
          Error when bad action string given.
static java.lang.String ERROR_CANNOT_READ_IN_URL
          Error when unable to read/open in URL {0} = URL {1} = exception stack trace.
static java.lang.String ERROR_CANNOT_READ_REF_URL
          Error when unable to read/open ref URL {0} = URL {1} = exception stack trace.
static java.lang.String ERROR_WRONG_RESULT
          Result didn't match reference result.
protected  java.net.URL in
           
protected  java.net.URL ref
           
 
Fields inherited from class org.apache.batik.test.AbstractTest
id, name, parent
 
Constructor Summary
Base64Test(java.lang.String action, java.net.URL in, java.net.URL ref)
          Constructor.
Base64Test(java.net.URL in)
          Constructor, for round trip testing (only one file required).
 
Method Summary
static int compareStreams(java.io.InputStream is1, java.io.InputStream is2, boolean skipws)
          Returns true if the contents of is1 match the contents of is2
 java.lang.String getName()
          Returns this Test's name
 org.apache.batik.test.TestReport runImpl()
          This method will only throw exceptions if some aspect of the test's internal operation fails.
 
Methods inherited from class org.apache.batik.test.AbstractTest
assertEquals, assertEquals, assertNull, assertTrue, error, getId, getParent, getQualifiedId, reportError, reportException, reportSuccess, run, runImplBasic, setId, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_BAD_ACTION_STRING

public static final java.lang.String ERROR_BAD_ACTION_STRING
Error when bad action string given. {0} = Bad action string

See Also:
Constant Field Values

ERROR_CANNOT_READ_IN_URL

public static final java.lang.String ERROR_CANNOT_READ_IN_URL
Error when unable to read/open in URL {0} = URL {1} = exception stack trace.

See Also:
Constant Field Values

ERROR_CANNOT_READ_REF_URL

public static final java.lang.String ERROR_CANNOT_READ_REF_URL
Error when unable to read/open ref URL {0} = URL {1} = exception stack trace.

See Also:
Constant Field Values

ERROR_WRONG_RESULT

public static final java.lang.String ERROR_WRONG_RESULT
Result didn't match reference result. {0} = first byte of mismatch

See Also:
Constant Field Values

ENTRY_KEY_ERROR_DESCRIPTION

public static final java.lang.String ENTRY_KEY_ERROR_DESCRIPTION
See Also:
Constant Field Values

action

protected java.lang.String action

in

protected java.net.URL in

ref

protected java.net.URL ref
Constructor Detail

Base64Test

public Base64Test(java.lang.String action,
                  java.net.URL in,
                  java.net.URL ref)
Constructor. ref is ignored if action == ROUND.


Base64Test

public Base64Test(java.net.URL in)
Constructor, for round trip testing (only one file required).

Method Detail

getName

public java.lang.String getName()
Returns this Test's name


runImpl

public org.apache.batik.test.TestReport runImpl()
                                         throws java.lang.Exception
This method will only throw exceptions if some aspect of the test's internal operation fails.


compareStreams

public static int compareStreams(java.io.InputStream is1,
                                 java.io.InputStream is2,
                                 boolean skipws)
Returns true if the contents of is1 match the contents of is2