Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.util
Class Base64OutputStream

    java.lang.Object
      |
      +--java.io.OutputStream
            |
            +--java.io.FilterOutputStream
                  |
                  +--com.compoze.util.Base64OutputStream

public class Base64OutputStream
extends java.io.FilterOutputStream

This class provides an implementation of a Base 64 encoder in the form of an extension of `FilterOutputStream`. It is based on the implementation of `BASE64EncoderStream` from Sun's JDK utility classes.

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`Base64OutputStream(java.io.OutputStream os)` Constructor.
`Base64OutputStream(java.io.OutputStream os, int i)` Constructor.

Method Summary
`void` | `close()` Flushes and closes the stream.
`void` | `encode()` Encodes the buffer.
`static byte[]` | `encode(byte[] abyte0)` Encodes a buffer to a new byte array.
`void` | `flush()` Flushes the encoder and the underlying `OutputStream`.
`void` | `write(byte[] abyte0)` Writes a byte array.
`void` | `write(byte[] abyte0, int i, int j)` Writes a byte array.
`void` | `write(int i)` Writes a single byte.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Base64OutputStream

    public Base64OutputStream(java.io.OutputStream os,
                              int i)

  Constructor.
  Parameters:
    `os` - the underlying `OutputStream`
    `i` - bytes per line

### Base64OutputStream

    public Base64OutputStream(java.io.OutputStream os)

  Constructor. The standard of 76 bytes per line is used.
  Parameters:
    `os` - the underlying `OutputStream`

Method Detail

### write

    public void write(byte[] abyte0,
                      int i,
                      int j)
               throws java.io.IOException

  Writes a byte array.
  Overrides:
    `write` in class `java.io.FilterOutputStream`
  Parameters:
    `abyte0` - the byte array to write
    `i` - the offset in the array
    `j` - the length
  Throws:
    `java.io.IOException` - if an i/o error occurred

### write

    public void write(byte[] abyte0)
               throws java.io.IOException

  Writes a byte array.
  Overrides:
    `write` in class `java.io.FilterOutputStream`
  Parameters:
    `abyte0` - the byte array to write
  Throws:
    `java.io.IOException` - if an i/o error occurred

### write

    public void write(int i)
               throws java.io.IOException

  Writes a single byte.
  Overrides:
    `write` in class `java.io.FilterOutputStream`
  Throws:
    `java.io.IOException` - if an i/o error occurred

### flush

    public void flush()
               throws java.io.IOException

  Flushes the encoder and the underlying `OutputStream`.
  Overrides:
    `flush` in class `java.io.FilterOutputStream`
  Throws:
    `java.io.IOException` - if an i/o error occurred

### close

    public void close()
               throws java.io.IOException

  Flushes and closes the stream.
  Overrides:
    `close` in class `java.io.FilterOutputStream`
  Throws:
    `java.io.IOException` - if an i/o error occurred

### encode

    public void encode()
                throws java.io.IOException

  Encodes the buffer.

### encode

    public static byte[] encode(byte[] abyte0)

  Encodes a buffer to a new byte array.
  Parameters:
    `abyte0` - the buffer

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.