public String toString(byte[] libraryPersistentId) { StringBuilder sb = new StringBuilder(); sb.append(dir.name()); sb.append('/'); String libDir = Util.pidToString(libraryPersistentId); sb.append(libDir); sb.append('/'); sb.append(String.format("%02d", id[7] & 0x0F)); sb.append('/'); sb.append(String.format("%02d", (id[7] >> 4) & 0x0F)); sb.append('/'); sb.append(String.format("%02d", id[6] & 0x0F)); sb.append('/' + libDir + "-" + Util.pidToString(id)); sb.append(".itc"); if (version != 1) { sb.append(version); } return sb.toString(); } }
String type = Util.toString(di.readInt()); consumed += 4; out.writeInt(Util.fromString(type)); out.writeInt(length); out.writeInt(Util.fromString(type)); out.writeInt(ba.length + 8); out.write(ba);
String type = Util.toString(di.readInt()); len -= 8; Util.assertEquals("url ", type); type = Util.toString(di.readInt()); len -= 8; Util.assertEquals("link", type); type = Util.toString(di.readInt()); len -= 8; type = Util.toString(di.readInt()); len -= 8; Util.assertEquals("aurl", type);
String type = Util.toString(di.readInt()); consumed += 4; if (Util.isIdentifier(type)) { throw new ItlException("Unhandled type: " + type); } else {
o.writeInt(Util.fromString("hdfm"));
public static Hdfm read(Input di, long fileLength) throws IOException, ItlException assertEquals("hdfm", Util.toString(hdr));
String type = Util.toString(di.readInt()); consumed += 4; if (Util.isIdentifier(type)) { throw new ItlException("Unhandled type: " + type); } else {
private void readHptm(Input di, int length) throws IOException, ItlException byte[] type = ByteBuffer.allocate(4).putInt(Util.fromString("hptm")).array(); byte[] len = ByteBuffer.allocate(4).putInt(length).array();
while (remaining > 0) { int bl = di.readInt(); String type = Util.toString(di.readInt());
return Util.pidToString(persistentId); } else { artwork = new Artwork();
rw.handleStatement(new StatementImpl(res, ITUNES_PERSISTENT_ID, new LiteralImpl(Util.pidToString(persistentId))));