public class IlvMapInputStream extends IlvInputStream
IlvMapInputStream is an extension of
IlvInputStream that reconnects IlvMapLayer
objects to IlvManagerLayer objects when they are read
from an IVL file. This class also handles
the associated files containing raster data.| Constructor and Description |
|---|
IlvMapInputStream(InputStream stream,
RandomAccessFile imageRandomAccess)
Deprecated.
use
IlvMapInputStream(InputStream stream, String filename)
instead. |
IlvMapInputStream(InputStream stream,
String imageFilename)
Creates an
IlvMapInputStream from an
InputStream instance. |
IlvMapInputStream(String mapFilename)
Creates an
IlvMapInputStream from a file. |
IlvMapInputStream(URL ilvFile)
Creates an
IlvMapInputStream from a URL. |
| Modifier and Type | Method and Description |
|---|---|
String |
getImageFilename()
Returns the name of the
.img file containing raster data. |
RandomAccessFile |
getImageRandomAccessFile()
Deprecated.
Use
getImageFilename() instead. |
boolean |
isAutoRearrange()
Tests if the auto rearrange is allowed to change the manager's layer
order after the
IlvMapDataSourceModel has been read. |
Boolean |
isGeneratingImage()
Tests if this stream is configured to generate images.
|
static boolean |
isIVL(String path)
Test if a file has a valid IVL structure.
|
static boolean |
isIVL(URL url)
Test if a file has a valid IVL structure.
|
void |
notifyMissingRasterData()
Notifies this input stream that
.img file containing raster
data related to the map being read is likely to be missing. |
void |
read(IlvGraphicBag bag)
Reads an
IlvInputStream. |
void |
setAutoRearrange(boolean autoRearrange)
Sets whether the rearrange layers is allowed to change manager
layers order after reading a
IlvMapDataSourceModel. |
void |
setGeneratingImage(Boolean t)
Set to
true so objects read with this stream
configure themselves to synchronously respond to a paint request. |
getDocumentBase, getGraphicBag, getObjects, getVersion, invokeConstructor, isASCIIMode, isDoubleVersion, readBoolean, readBooleanArray, readColor, readColorArray, readComponentOrientation, readDouble, readDoubleArray, readDoubleOrFloat, readDoubleOrFloatArray, readExtensions, readFloat, readFloatArray, readFont, readFontArray, readGradient, readInt, readIntArray, readLocale, readLong, readLongArray, readObject, readObject, readObjectArray, readObjects, readPaint, readPattern, readPersistentObject, readPersistentObjects, readPoint, readPointArray, readRect, readRectArray, readShape, readShort, readShortArray, readString, readStringArray, readStroke, readTexture, readTransformer, readTransformerArray, readULocale, registerGraphic, setCopyPasteMode, setDocumentBase, setVersion@Deprecated public IlvMapInputStream(InputStream stream, RandomAccessFile imageRandomAccess)
IlvMapInputStream(InputStream stream, String filename)
instead.IlvMapInputStream from an
InputStream instance.stream - The stream to read the map from.imageRandomAccess - A RandomAccessFile on the file containing
raster data for objects in the serialized map.public IlvMapInputStream(InputStream stream, String imageFilename)
IlvMapInputStream from an
InputStream instance.stream - The stream to read the map from.imageFilename - The name of the file containing raster data for objects in the
serialized map.public IlvMapInputStream(URL ilvFile) throws IOException
IlvMapInputStream from a URL.
This constructor seeks a corresponding URL (see IlvMapOutputStream.getImageFileSuffix()) for the image data.
If possible, it initializes the corresponding direct access stream.
If it cannot initialize the distant stream, it copies the image data to the local temporary file system and
opens a stream to that copy.ilvFile - The URL for the the map data.IOException - if the IVL URL cannot be opened.public IlvMapInputStream(String mapFilename) throws IOException
IlvMapInputStream from a file.mapFilename - The map file to open.IOException - if the file mapFilename was not found.public boolean isAutoRearrange()
IlvMapDataSourceModel has been read.
The default value is true.
Note: this property is not persistent.
true if the rearrange layers is allowed to change
the layer order in the manager.public void setAutoRearrange(boolean autoRearrange)
IlvMapDataSourceModel.
The default value is true.
Note: this property is not persistent.
autoRearrange - Set to false to prevent the manager's layer order
from being rearranged.public void read(IlvGraphicBag bag) throws IOException, IlvReadFileException
IlvInputStream.read in class IlvInputStreambag - The graphic bag in which objects will be added.IOException - if there are any I/O errors.IlvReadFileException - if the format is not correct or if
some classes cannot be loaded.IlvInputStream.read(ilog.views.IlvGraphicBag)@Deprecated public RandomAccessFile getImageRandomAccessFile()
getImageFilename() instead.RandomAccessFile used on the file containing
raster data.RandomAccessFile used on the file containing
raster data.public String getImageFilename()
.img file containing raster data..img file name.public void notifyMissingRasterData()
.img file containing raster
data related to the map being read is likely to be missing.public void setGeneratingImage(Boolean t)
true so objects read with this stream
configure themselves to synchronously respond to a paint request.t - Set to true so object read using this stream
synchronously respond to a paint request.public Boolean isGeneratingImage()
true if this stream is configured to generate
images.public static boolean isIVL(String path)
path - The path to the file to be tested.true if the file is a valid IVL file.public static boolean isIVL(URL url)
url - The URL to the file to validate.true if the file is a valid IVL file.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.