public class RecordInfo
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
RecordInfo()
Creates a new empty instance
|
RecordInfo(RecordInfo recordInfo)
Creates a new instance from another instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all the information held by the current instance.
|
void |
clearFields()
Clears the extra fields (names and values)
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getField(java.lang.String name)
Gets the value of an extra field
|
java.util.Collection<java.lang.String> |
getFieldNames()
Gets the names of all the extra fields contained
|
JGeometry |
getGeometry()
Gets the geometry associated to the source record
|
java.lang.String |
getId()
Gets the id used to identify the source record
|
long |
getLength()
Gets the length in bytes of the source record
|
int |
getNumberOfFields()
Gets the number of extra fields contained by this instance.
|
long |
getOffset()
Gets the position in file of the source record as an offset in bytes.
|
java.lang.String |
getPath()
Gets the path (as a String) to the file containing the source record
|
void |
readFields(java.io.DataInput in) |
java.lang.String |
removeField(java.lang.String name)
Removes the extra field with the given name
|
void |
set(RecordInfo recordInfo)
Copies the content from another RecordInfo instance
|
boolean |
setField(java.lang.String name, java.lang.String value)
Adds an extra field.
|
void |
setGeometry(JGeometry geometry)
Sets the geometry associated to the source record
|
void |
setId(java.lang.String id)
Sets the id used to identify the source record
|
void |
setLength(long length)
Sets the length in bytes of the source record
|
void |
setNumberOfFields(int numberOfFields)
Sets the number of extra fields that will be held by the instance.
|
void |
setOffset(long offset)
Sets the position in file of the source record as an offset in bytes.
|
void |
setPath(java.lang.String path)
Sets the path (as a String) to the file containing the source record
|
java.lang.String |
toString() |
void |
write(java.io.DataOutput out) |
public RecordInfo()
public RecordInfo(RecordInfo recordInfo)
recordInfo
- a RecordInfo instancepublic void clear()
public void clearFields()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getField(java.lang.String name)
name
- the extra field's namepublic java.util.Collection<java.lang.String> getFieldNames()
public JGeometry getGeometry()
public java.lang.String getId()
public long getLength()
public int getNumberOfFields()
public long getOffset()
public java.lang.String getPath()
public void readFields(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public java.lang.String removeField(java.lang.String name)
name
- the extra field's namepublic void set(RecordInfo recordInfo)
recordInfo
- a RecordInfo instancepublic boolean setField(java.lang.String name, java.lang.String value)
name
- the field's namevalue
- the field's valuepublic void setGeometry(JGeometry geometry)
geometry
- a JGeometry instancepublic void setId(java.lang.String id)
id
- the id of the record represented by the current instancepublic void setLength(long length)
length
- he source record's length in bytespublic void setNumberOfFields(int numberOfFields)
numberOfFields
- the number of extra fields contained by the instancepublic void setOffset(long offset)
offset
- the position of the source recordpublic void setPath(java.lang.String path)
path
- a string representation of a pathpublic java.lang.String toString()
toString
in class java.lang.Object
public void write(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.