com.sun.portal.search.soif
Class SOIFOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byjava.io.DataOutputStream
              extended bycom.sun.portal.search.soif.SOIFOutputStream
All Implemented Interfaces:
java.io.DataOutput

public class SOIFOutputStream
extends java.io.DataOutputStream

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


Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
SOIFOutputStream(java.io.OutputStream os)
          Creates a new SOIFOutputStream
SOIFOutputStream(java.io.OutputStream os, java.lang.String encoding)
          Creates a new SOIFOutputStream
SOIFOutputStream(java.lang.String filename)
          Creates a new file based SOIFOutputStream using the default character encoding (UTF-8)
SOIFOutputStream(java.lang.String filename, java.lang.String encoding)
          Creates a new file based SOIFOutputStream
 
Method Summary
 void setAllowed(java.util.Set allowed)
          Sets the allowed attributes on oouput.
 void write(SOIF s)
          Writes a SOIF object to this output stream.
 void write(SOIF s, java.util.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

SOIFOutputStream

public SOIFOutputStream(java.io.OutputStream os)
Creates a new SOIFOutputStream


SOIFOutputStream

public SOIFOutputStream(java.io.OutputStream os,
                        java.lang.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(java.lang.String filename)
                 throws java.io.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(java.lang.String filename,
                        java.lang.String encoding)
                 throws java.io.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(java.util.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 java.io.IOException
Writes a SOIF object to this output stream.

Parameters:
s - the SOIF to be written
Throws:
java.io.IOException

write

public void write(SOIF s,
                  java.util.Set allowed)
           throws java.io.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)
Throws:
java.io.IOException