public class DefaultHomeInputStream extends FilterInputStream
InputStream
filter that reads a home from a stream
at .sh3d file format.DefaultHomeOutputStream
in
Constructor and Description |
---|
DefaultHomeInputStream(File file,
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.
|
available, close, mark, markSupported, read, read, read, reset, skip
public DefaultHomeInputStream(InputStream in) throws IOException
in
. The dependencies of the read home included in the stream
will be checked.IOException
public DefaultHomeInputStream(InputStream in, ContentRecording contentRecording) throws IOException
in
.IOException
public 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 file, ContentRecording contentRecording, HomeXMLHandler xmlHandler, UserPreferences preferences, boolean preferPreferencesContent) throws FileNotFoundException
file
.
The file will be read directly without using a temporary copy except if it contains some invalid entries.file
- 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
IOException
ClassNotFoundException
© Copyrights 2006-2016 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License