public class DefaultHomeInputStream extends FilterInputStream
InputStream filter that reads a home from a stream
at .sh3d file format.DefaultHomeOutputStreamin| Constructor and Description |
|---|
DefaultHomeInputStream(File zipFile,
ContentRecording contentRecording,
HomeXMLHandler xmlHandler,
UserPreferences preferences,
boolean preferPreferencesContent)
Creates a home input stream filter able to read a home and its content the given file.
|
DefaultHomeInputStream(InputStream in)
Creates a home input stream filter able to read a home and its content
from
in. |
DefaultHomeInputStream(InputStream in,
ContentRecording contentRecording)
Creates a home input stream filter able to read a home and its content
from
in. |
DefaultHomeInputStream(InputStream in,
ContentRecording contentRecording,
HomeXMLHandler xmlHandler,
UserPreferences preferences,
boolean preferPreferencesContent)
Creates a home input stream filter able to read a home and its content
from
in. |
DefaultHomeInputStream(InputStream in,
ContentRecording contentRecording,
UserPreferences preferences,
boolean preferPreferencesContent)
Creates a home input stream filter able to read a home and its content
from
in. |
| Modifier and Type | Method and Description |
|---|---|
Home |
readHome()
Reads home from a zipped stream containing a
Home.xml or Home entry,
or if the stream isn't zipped, reads the input stream as a XML input stream. |
available, close, mark, markSupported, read, read, read, reset, skippublic DefaultHomeInputStream(InputStream in) throws IOException
in. The dependencies of the read home included in the stream
will be checked.IOExceptionpublic DefaultHomeInputStream(InputStream in, ContentRecording contentRecording) throws IOException
in.IOExceptionpublic DefaultHomeInputStream(InputStream in, ContentRecording contentRecording, UserPreferences preferences, boolean preferPreferencesContent)
in. If preferences isn't null
and preferPreferencesContent is true,
the furniture and textures contents it references will replace the one of
the read home when they are equal. If preferPreferencesContent
is false, preferences content will be used only
to replace damaged equal content that might be found in read home files.public DefaultHomeInputStream(InputStream in, ContentRecording contentRecording, HomeXMLHandler xmlHandler, UserPreferences preferences, boolean preferPreferencesContent)
in.in - the zipped stream from which the home will be readcontentRecording - specifies whether content referenced by the read home is included
or not in the stream.xmlHandler - SAX handler used to parse Home.xml entry when present, or
null if only Home entry should taken into account.preferences - if not null and preferPreferencesContent
is true, the furniture and textures contents it references will
replace the one of the read home when they are equal.
If preferPreferencesContent is false, preferences
content will be used only to replace damaged equal content that might be found
in read home files.preferPreferencesContent - if true, the returned home will reference
contents in preferences when equal.public DefaultHomeInputStream(File zipFile, ContentRecording contentRecording, HomeXMLHandler xmlHandler, UserPreferences preferences, boolean preferPreferencesContent) throws FileNotFoundException
zipFile - the zipped file from which the home will be readcontentRecording - specifies whether content referenced by the read home is included
or not in the stream.xmlHandler - SAX handler used to parse Home.xml entry when present, or
null if only Home entry should taken into account.preferences - if not null and preferPreferencesContent
is true, the furniture and textures contents it references will
replace the one of the read home when they are equal.
If preferPreferencesContent is false, preferences
content will be used only to replace damaged equal content that might be found
in read home files.preferPreferencesContent - if true, the returned home will reference
contents in preferences when equal.FileNotFoundException - if the given file can't be openedpublic Home readHome() throws IOException, ClassNotFoundException
Home.xml or Home entry,
or if the stream isn't zipped, reads the input stream as a XML input stream.IOExceptionClassNotFoundException

© Copyrights 2006-2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License