public class IlvMIDReader extends Object
.mid
extension).
.mid
files contain the attributes of the map objects.
This reader can be used as an iterator on a .mid
file.IlvMIDMIFReader
Constructor and Description |
---|
IlvMIDReader(String filename,
IlvAttributeInfoProperty info)
Constructs a new
MIDReader to read from the file whose name is specified,
with the specified attribute info . |
IlvMIDReader(String filename,
IlvAttributeInfoProperty info,
char delimiter,
String charset)
Constructs a new
MIDReader to read from the file whose name is specified,
with the specified attribute info, the specified delimiter, and the
specified character encoding. |
IlvMIDReader(URL url,
IlvAttributeInfoProperty info,
char delimiter,
String charset)
Constructs a new
MIDReader to read from the file whose name is specified,
with the specified attribute info, the specified delimiter, and the
specified character encoding. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases the resources allocated to the reader.
|
void |
finalize()
Called by the Java Garbage Collector to release
the resources allocated to the reader.
|
IlvAttributeInfoProperty |
getAttributeInfo()
Returns the types and names of the fields contained in the
.MID file. |
IlvFeatureAttributeProperty |
getNextRecord()
Reads the next record in the
.MID file. |
public IlvMIDReader(String filename, IlvAttributeInfoProperty info) throws IOException
MIDReader
to read from the file whose name is specified,
with the specified attribute info
. The delimiter is defaulted to the
TAB
character, and the string encoding is the default
character encoding of the local platform.filename
- The name of the MID
file.info
- The IlvAttributeInfoProperty
, as defined in
the MIF
file.IOException
- If an I/O error occurs.IlvMIFReader.getAttributeInfo()
public IlvMIDReader(String filename, IlvAttributeInfoProperty info, char delimiter, String charset) throws IOException
MIDReader
to read from the file whose name is specified,
with the specified attribute info, the specified delimiter, and the
specified character encoding. The character encoding string is the
same as used in java.lang.String
constructor.filename
- The name of the MID
file.info
- The IlvAttributeInfoProperty
, as defined in
the MIF
file.delimiter
- The field delimiter.charset
- The string encoding.IOException
- If an I/O error occurs.IlvMIFReader.getAttributeInfo()
,
IlvMIFReader.getJavaCharset()
public IlvMIDReader(URL url, IlvAttributeInfoProperty info, char delimiter, String charset) throws IOException
MIDReader
to read from the file whose name is specified,
with the specified attribute info, the specified delimiter, and the
specified character encoding. The character encoding string is the
same as used in java.lang.String
constructor.url
- The name of the MID
URL.info
- The IlvAttributeInfoProperty
, as defined in
the MIF
file.delimiter
- The field delimiter.charset
- The string encoding.IOException
- If an I/O error occurs.IlvMIFReader.getAttributeInfo()
,
IlvMIFReader.getJavaCharset()
public void dispose()
public void finalize()
dispose
method
has not been called, it releases the resources used by the reader.public IlvAttributeInfoProperty getAttributeInfo()
.MID
file.public IlvFeatureAttributeProperty getNextRecord() throws IOException
.MID
file.
The returned attribute value is volatile and might be modified
when the getNextRecord
method is called again.IOException
- If the end of the file is reached or
if an I/O error occurs.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.