com.sun.portal.search.soif
Class SOIFOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.DataOutputStream
                    |
                    +--com.sun.portal.search.soif.SOIFOutputStream
All Implemented Interfaces:
DataOutput

public class SOIFOutputStream
extends DataOutputStream

SOIFOutputStream class. Writes serialized SOIF objects to an output stream.


Constructor Summary
SOIFOutputStream(OutputStream os)
          Creates a new SOIFOutputStream
SOIFOutputStream(OutputStream os, String encoding)
          Creates a new SOIFOutputStream
SOIFOutputStream(String filename)
          Creates a new file based SOIFOutputStream using the default character encoding (UTF-8)
SOIFOutputStream(String filename, String encoding)
          Creates a new file based SOIFOutputStream
 
Method Summary
 void setAllowed(Set allowed)
          Sets the allowed attributes on oouput.
 void write(SOIF s)
          Writes a SOIF object to this output stream.
 void write(SOIF s, Set allowed)
          Writes a SOIF to this output stream including only the allowed attributes.
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

SOIFOutputStream

public SOIFOutputStream(OutputStream os)
Creates a new SOIFOutputStream

SOIFOutputStream

public SOIFOutputStream(OutputStream os,
                        String encoding)
Creates a new SOIFOutputStream
Parameters:
os - the underlying output stream to write SOIF to
encoding - the character encoding of the output SOIF

SOIFOutputStream

public SOIFOutputStream(String filename)
                 throws FileNotFoundException
Creates a new file based SOIFOutputStream using the default character encoding (UTF-8)
Parameters:
filename - the file to write SOIF objects to

SOIFOutputStream

public SOIFOutputStream(String filename,
                        String encoding)
                 throws FileNotFoundException
Creates a new file based SOIFOutputStream
Parameters:
filename - the file to write SOIF objects to
encoding - the character encoding of the output SOIF
Method Detail

setAllowed

public void setAllowed(Set allowed)
Sets the allowed attributes on oouput. Only attributes in the allowed set will be written out.
Parameters:
allowed - a restricted attribute set for the conversion (use lower case)

write

public void write(SOIF s)
           throws IOException
Writes a SOIF object to this output stream.
Parameters:
s - the SOIF to be written

write

public void write(SOIF s,
                  Set allowed)
           throws IOException
Writes a SOIF to this output stream including only the allowed attributes.
Parameters:
allowed - a restricted attribute set for the conversion (use lower case)