Package com.mta.tehreer.sfnt.tables
Class NameTable.Record
java.lang.Object
com.mta.tehreer.sfnt.tables.NameTable.Record
- Enclosing class:
- NameTable
Represents a single record of OpenType `name' table.
-
Field Summary
Modifier and TypeFieldDescriptionbyte[]
The encoded bytes of this record.int
The encoding id of this record.int
The language id of this record.int
The name id of this record.int
The platform id of this record. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncharset()
Determines a suitable charset for this record reflectingplatformId
andencodingId
.boolean
int
hashCode()
locale()
Generates a relevant locale for this record by interpretingplatformId
andlanguageId
.string()
Decodes thebytes
array into a string using a suitable charset.toString()
-
Field Details
-
nameId
public int nameIdThe name id of this record. -
platformId
public int platformIdThe platform id of this record. -
languageId
public int languageIdThe language id of this record. -
encodingId
public int encodingIdThe encoding id of this record. -
bytes
public byte[] bytesThe encoded bytes of this record.
-
-
Constructor Details
-
Record
public Record(int nameId, int platformId, int languageId, int encodingId, byte[] bytes) Constructs aNameTable.Record
object.- Parameters:
nameId
- The name id of record.platformId
- The platform id of record.languageId
- The language id of record.encodingId
- The encoding id of record.bytes
- The encoded bytes of record.
-
Record
public Record()Constructs aNameTable.Record
object.
-
-
Method Details
-
locale
Generates a relevant locale for this record by interpretingplatformId
andlanguageId
.- Returns:
- The relevant locale for this record.
-
charset
Determines a suitable charset for this record reflectingplatformId
andencodingId
. If a charset cannot be determined or is unsupported in the current Java virtual machine, thennull
is returned.- Returns:
- The suitable charset for this record, or
null
.
-
string
Decodes thebytes
array into a string using a suitable charset. If no suitable charset is available, thennull
is returned.- Returns:
- The decoded string for this record, or
null
.
-
equals
-
hashCode
public int hashCode() -
toString
-