/** * 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; }
String charsetName = getCharsetName(platformID, platformSpecificID); Charset charset = Charset.forName(charsetName);
String charsetName = getCharsetName(platformID, platformSpecificID); Charset charset = Charset.forName(charsetName);
String charsetName = getCharsetName(platformID, platformSpecificID); Charset charset = Charset.forName(charsetName);
String charsetName = getCharsetName(rec.platformID, rec.platformSpecificID); Charset charset = Charset.forName(charsetName);
String charsetName = getCharsetName(rec.platformID, rec.platformSpecificID); Charset charset = Charset.forName(charsetName);
String charsetName = getCharsetName(rec.platformID, rec.platformSpecificID); Charset charset = Charset.forName(charsetName);