com.github.libxjava.io
Class BaseX

java.lang.Object
  extended by com.github.libxjava.io.BaseX
Direct Known Subclasses:
Base64, Base85, Base91

public abstract class BaseX
extends Object

Version:
libxjava-jse5 - 0.2
Author:
Marcel Patzlaff

Constructor Summary
protected BaseX()
           
 
Method Summary
 byte[] decode(byte[] b)
          Same as decode(b, 0, b.length.
 byte[] decode(byte[] b, int off, int len)
          Decodes the specified block of bytes and assumes that it holds all bytes to decode.
 void decode(InputStream in, OutputStream out)
          Decodes the data from in and writes it to out.
 byte[] encode(byte[] b)
          Same as encode(b, 0, b.length.
 byte[] encode(byte[] b, int off, int len)
          Encodes the specified block of bytes and assumes that it holds all bytes to encode.
 void encode(byte[] b, int off, int len, OutputStream out)
           
 void encode(InputStream in, OutputStream out)
          Encodes the data from in and writes it to out.
protected abstract  void internalDecode(InputStream in, OutputStream out)
           
protected abstract  void internalEncode(InputStream in, OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseX

protected BaseX()
Method Detail

encode

public final byte[] encode(byte[] b)
Same as encode(b, 0, b.length.

See Also:
encode(byte[], int, int)

encode

public final byte[] encode(byte[] b,
                           int off,
                           int len)
Encodes the specified block of bytes and assumes that it holds all bytes to encode.


encode

public final void encode(byte[] b,
                         int off,
                         int len,
                         OutputStream out)
                  throws IOException
Throws:
IOException

encode

public final void encode(InputStream in,
                         OutputStream out)
                  throws IOException
Encodes the data from in and writes it to out. It does so until it reads an {code end-of-file} from in.

Throws:
IOException

decode

public final byte[] decode(byte[] b)
Same as decode(b, 0, b.length.

See Also:
decode(byte[], int, int)

decode

public final byte[] decode(byte[] b,
                           int off,
                           int len)
Decodes the specified block of bytes and assumes that it holds all bytes to decode.


decode

public final void decode(InputStream in,
                         OutputStream out)
                  throws IOException
Decodes the data from in and writes it to out. It does so until it reads an {code end-of-file} from in.

Throws:
IOException

internalDecode

protected abstract void internalDecode(InputStream in,
                                       OutputStream out)
                                throws IOException
Throws:
IOException

internalEncode

protected abstract void internalEncode(InputStream in,
                                       OutputStream out)
                                throws IOException
Throws:
IOException


Copyright © 2010 Marcel Patzlaff. All Rights Reserved.