Sweet Home 3D 3.4

com.eteks.sweethome3d.io
Class DefaultHomeOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.eteks.sweethome3d.io.DefaultHomeOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class DefaultHomeOutputStream
extends java.io.FilterOutputStream

An OutputStream filter that writes a home in a stream at .sh3d file format.

See Also:
DefaultHomeInputStream

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
DefaultHomeOutputStream(java.io.OutputStream out)
          Creates a stream that will serialize a home and all the contents it references in an uncompressed zip stream.
DefaultHomeOutputStream(java.io.OutputStream out, int compressionLevel, boolean includeOnlyTemporaryContent)
          Creates a stream that will serialize a home in a zip stream.
 
Method Summary
 void writeHome(Home home)
          Writes home in a zipped stream followed by Content objects it points to.
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHomeOutputStream

public DefaultHomeOutputStream(java.io.OutputStream out)
                        throws java.io.IOException
Creates a stream that will serialize a home and all the contents it references in an uncompressed zip stream.

Throws:
java.io.IOException

DefaultHomeOutputStream

public DefaultHomeOutputStream(java.io.OutputStream out,
                               int compressionLevel,
                               boolean includeOnlyTemporaryContent)
                        throws java.io.IOException
Creates a stream that will serialize a home in a zip stream.

Parameters:
compressionLevel - 0-9
includeOnlyTemporaryContent - if true, only content instances of TemporaryURLContent class referenced by the saved home will be written. If false, all the content instances referenced by the saved home will be written in the zip stream.
Throws:
java.io.IOException
Method Detail

writeHome

public void writeHome(Home home)
               throws java.io.IOException
Writes home in a zipped stream followed by Content objects it points to.

Throws:
java.io.IOException

Sweet Home 3D 3.4

? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License