public String asFileName() { String str = Integer.toHexString(id).toUpperCase(Locale.ROOT); while (str.length() < 4) { str = "0" + str; } return str + usualType.asFileEnding(); }
/** * Creates a string to use to identify this chunk in the POI file system * object. */ public String getEntryName() { String type = this.type.asFileEnding(); String chunkId = Integer.toHexString(this.chunkId); while (chunkId.length() < 4) { chunkId = "0" + chunkId; } return this.namePrefix + chunkId.toUpperCase(Locale.ROOT) + type.toUpperCase(Locale.ROOT); }
private String getFileName(MAPIProperty property, MAPIType actualType) { String str = Integer.toHexString(property.id).toUpperCase(Locale.ROOT); while (str.length() < 4) { str = "0" + str; } MAPIType type = getTypeMapping(actualType); return str + type.asFileEnding(); }
/** * Creates all the chunks for a given Directory, but * doesn't recurse or descend */ protected static void processChunks(DirectoryNode node, ChunkGroup grouping) { for(Entry entry : node) { if(entry instanceof DocumentNode) { process(entry, grouping); } else if(entry instanceof DirectoryNode) { if(entry.getName().endsWith(Types.DIRECTORY.asFileEnding())) { process(entry, grouping); } } } }
@Override public String toString() { return id + " / 0x" + asFileEnding() + " - " + name + " @ " + length; }