/** Get a pretty string */ public String toString() { StringBuffer buf = new StringBuffer(); String indent = " "; buf.append(indent + "Format: " + getFormat() + "\n"); buf.append(indent + "Count : " + getCount() + "\n"); for (Iterator i = records.keySet().iterator(); i.hasNext();) { NameRecord rec = (NameRecord) i.next(); buf.append(indent + " platformID: " + rec.platformID); buf.append(" platformSpecificID: " + rec.platformSpecificID); buf.append(" languageID: " + rec.languageID); buf.append(" nameID: " + rec.nameID + "\n"); buf.append(indent + " " + records.get(rec) + "\n"); } return buf.toString(); }
/** Get a pretty string */ public String toString() { StringBuffer buf = new StringBuffer(); String indent = " "; buf.append(indent + "Format: " + getFormat() + "\n"); buf.append(indent + "Count : " + getCount() + "\n"); for (Iterator i = records.keySet().iterator(); i.hasNext();) { NameRecord rec = (NameRecord) i.next(); buf.append(indent + " platformID: " + rec.platformID); buf.append(" platformSpecificID: " + rec.platformSpecificID); buf.append(" languageID: " + rec.languageID); buf.append(" nameID: " + rec.nameID + "\n"); buf.append(indent + " " + records.get(rec) + "\n"); } return buf.toString(); }
/** Get a pretty string */ public String toString() { StringBuffer buf = new StringBuffer(); String indent = " "; buf.append(indent + "Format: " + getFormat() + "\n"); buf.append(indent + "Count : " + getCount() + "\n"); for (Iterator i = records.keySet().iterator(); i.hasNext();) { NameRecord rec = (NameRecord) i.next(); buf.append(indent + " platformID: " + rec.platformID); buf.append(" platformSpecificID: " + rec.platformSpecificID); buf.append(" languageID: " + rec.languageID); buf.append(" nameID: " + rec.nameID + "\n"); buf.append(indent + " " + records.get(rec) + "\n"); } return buf.toString(); }
/** * Get the length of this table */ public int getLength() { // start with the size of the fixed header plus the size of the // records int length = 6 + (12 * getCount()); // add the size of each record for (Iterator i = records.keySet().iterator(); i.hasNext();) { NameRecord rec = (NameRecord) i.next(); String value = (String) records.get(rec); // choose the charset String charsetName = getCharsetName(rec.platformID, rec.platformSpecificID); Charset charset = Charset.forName(charsetName); // encode ByteBuffer buf = charset.encode(value); // add the size of the coded buffer length += buf.remaining(); } return length; }
/** * Get the length of this table */ public int getLength() { // start with the size of the fixed header plus the size of the // records int length = 6 + (12 * getCount()); // add the size of each record for (Iterator i = records.keySet().iterator(); i.hasNext();) { NameRecord rec = (NameRecord) i.next(); String value = (String) records.get(rec); // choose the charset String charsetName = getCharsetName(rec.platformID, rec.platformSpecificID); Charset charset = Charset.forName(charsetName); // encode ByteBuffer buf = charset.encode(value); // add the size of the coded buffer length += buf.remaining(); } return length; }
/** * Get the length of this table */ public int getLength() { // start with the size of the fixed header plus the size of the // records int length = 6 + (12 * getCount()); // add the size of each record for (Iterator i = records.keySet().iterator(); i.hasNext();) { NameRecord rec = (NameRecord) i.next(); String value = (String) records.get(rec); // choose the charset String charsetName = getCharsetName(rec.platformID, rec.platformSpecificID); Charset charset = Charset.forName(charsetName); // encode ByteBuffer buf = charset.encode(value); // add the size of the coded buffer length += buf.remaining(); } return length; }