iaik.smime
Class CanonicalizeOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by iaik.smime.CanonicalizeOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class CanonicalizeOutputStream
extends java.io.FilterOutputStream

Canonicalizes an output stream so that any line is finished by a CRFL (13, 10).


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
CanonicalizeOutputStream(java.io.OutputStream os)
          Creates a new CanonicalizeOutputStream for canonicalizing the given output stream.
 
Method Summary
 void write(byte[] b, int off, int len)
          Writes len bytes from the specified byte array starting at offset off to this output stream.
 void write(int b)
          Writes the specified byte to this output stream.
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CanonicalizeOutputStream

public CanonicalizeOutputStream(java.io.OutputStream os)
Creates a new CanonicalizeOutputStream for canonicalizing the given output stream.

Parameters:
os - the output stream to be canonicalized
Method Detail

write

public void write(int b)
           throws java.io.IOException
Writes the specified byte to this output stream.

The write method of FilterOutputStream calls the write method of its underlying output stream.

Overrides:
write in class java.io.FilterOutputStream
Parameters:
b - the byte.
Throws:
java.io.IOException - if an I/O error occurs.
Since:
JDK1.0

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Writes len bytes from the specified byte array starting at offset off to this output stream.

Overrides:
write in class java.io.FilterOutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
java.io.IOException - if an I/O error occurs.

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC