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
FieldsModifier and TypeFieldDescriptionbyte[]The encoded bytes of this record.intThe encoding id of this record.intThe language id of this record.intThe name id of this record.intThe platform id of this record. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharset()Determines a suitable charset for this record reflectingplatformIdandencodingId.booleaninthashCode()locale()Generates a relevant locale for this record by interpretingplatformIdandlanguageId.string()Decodes thebytesarray 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.Recordobject.- 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.Recordobject.
-
-
Method Details
-
locale
Generates a relevant locale for this record by interpretingplatformIdandlanguageId.- Returns:
- The relevant locale for this record.
-
charset
Determines a suitable charset for this record reflectingplatformIdandencodingId. If a charset cannot be determined or is unsupported in the current Java virtual machine, thennullis returned.- Returns:
- The suitable charset for this record, or
null.
-
string
Decodes thebytesarray into a string using a suitable charset. If no suitable charset is available, thennullis returned.- Returns:
- The decoded string for this record, or
null.
-
equals
-
hashCode
public int hashCode() -
toString
-