private static void dumpContent(Map<Integer, ClassInfo> descrMap, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth, final int leadByte) throws IOException { switch (leadByte) { case TC_BLOCKDATA: { final int len = dis.readUnsignedByte(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } case TC_BLOCKDATALONG: { final int len = dis.readInt(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } default: { dumpObject(descrMap, seq, dis, w, depth, leadByte); return; } } }
private static void dumpContent(Map<Integer, ClassInfo> descrMap, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth, final int leadByte) throws IOException { switch (leadByte) { case TC_BLOCKDATA: { final int len = dis.readUnsignedByte(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } case TC_BLOCKDATALONG: { final int len = dis.readInt(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } default: { dumpObject(descrMap, seq, dis, w, depth, leadByte); return; } } }
private static void dumpContent(Map<Integer, ClassInfo> descrMap, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth, final int leadByte) throws IOException { switch (leadByte) { case TC_BLOCKDATA: { final int len = dis.readUnsignedByte(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } case TC_BLOCKDATALONG: { final int len = dis.readInt(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } default: { dumpObject(descrMap, seq, dis, w, depth, leadByte); return; } } }
private static void dumpContent(Map<Integer, ClassInfo> descrMap, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth, final int leadByte) throws IOException { switch (leadByte) { case TC_BLOCKDATA: { final int len = dis.readUnsignedByte(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } case TC_BLOCKDATALONG: { final int len = dis.readInt(); printf(w, depth, "[%02x] TC_BLOCKDATA - Data block of %d bytes", Integer.valueOf(TC_BLOCKDATA), Integer.valueOf(len)); for (int i = 0; i < len; i += dis.skipBytes(len - i)); return; } default: { dumpObject(descrMap, seq, dis, w, depth, leadByte); return; } } }
printf(w, depth + 2, "[%d] = %s", Integer.valueOf(i), fieldType.getValueString(dis)); if (fieldType.isObject()) { dumpObject(descrMap, seq, dis, w, depth + 3, dis.readUnsignedByte());
printf(w, depth + 2, "[%d] = %s", Integer.valueOf(i), fieldType.getValueString(dis)); if (fieldType.isObject()) { dumpObject(descrMap, seq, dis, w, depth + 3, dis.readUnsignedByte());
printf(w, depth + 2, "[%d] = %s", Integer.valueOf(i), fieldType.getValueString(dis)); if (fieldType.isObject()) { dumpObject(descrMap, seq, dis, w, depth + 3, dis.readUnsignedByte());
printf(w, depth + 2, "[%d] = %s", Integer.valueOf(i), fieldType.getValueString(dis)); if (fieldType.isObject()) { dumpObject(descrMap, seq, dis, w, depth + 3, dis.readUnsignedByte());
private static void dumpFields(final ClassInfo info, final Map<Integer, ClassInfo> map, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth) throws IOException { if ((info.flags & SC_EXTERNALIZABLE) != 0) { printf(w, depth, "[--] Externalizable data block:"); dumpBlockData(map, seq, dis, w, depth + 1); } else if ((info.flags & SC_SERIALIZABLE) != 0) { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] Fields for class %s:", info.name); for (FieldInfo fieldInfo : info.info) { printf(w, depth + 1, "[--] Field %s = %s", fieldInfo.name, fieldInfo.type.getValueString(dis)); if (fieldInfo.type.isObject()) { dumpObject(map, seq, dis, w, depth + 2, dis.readUnsignedByte()); } } if ((info.flags & SC_WRITE_METHOD) != 0) { printf(w, depth, "[--] Custom data for class %s:", info.name); dumpBlockData(map, seq, dis, w, depth + 1); } } else { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] No info for class %s", info.name); } }
private static void dumpFields(final ClassInfo info, final Map<Integer, ClassInfo> map, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth) throws IOException { if ((info.flags & SC_EXTERNALIZABLE) != 0) { printf(w, depth, "[--] Externalizable data block:"); dumpBlockData(map, seq, dis, w, depth + 1); } else if ((info.flags & SC_SERIALIZABLE) != 0) { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] Fields for class %s:", info.name); for (FieldInfo fieldInfo : info.info) { printf(w, depth + 1, "[--] Field %s = %s", fieldInfo.name, fieldInfo.type.getValueString(dis)); if (fieldInfo.type.isObject()) { dumpObject(map, seq, dis, w, depth + 2, dis.readUnsignedByte()); } } if ((info.flags & SC_WRITE_METHOD) != 0) { printf(w, depth, "[--] Custom data for class %s:", info.name); dumpBlockData(map, seq, dis, w, depth + 1); } } else { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] No info for class %s", info.name); } }
private static void dumpFields(final ClassInfo info, final Map<Integer, ClassInfo> map, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth) throws IOException { if ((info.flags & SC_EXTERNALIZABLE) != 0) { printf(w, depth, "[--] Externalizable data block:"); dumpBlockData(map, seq, dis, w, depth + 1); } else if ((info.flags & SC_SERIALIZABLE) != 0) { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] Fields for class %s:", info.name); for (FieldInfo fieldInfo : info.info) { printf(w, depth + 1, "[--] Field %s = %s", fieldInfo.name, fieldInfo.type.getValueString(dis)); if (fieldInfo.type.isObject()) { dumpObject(map, seq, dis, w, depth + 2, dis.readUnsignedByte()); } } if ((info.flags & SC_WRITE_METHOD) != 0) { printf(w, depth, "[--] Custom data for class %s:", info.name); dumpBlockData(map, seq, dis, w, depth + 1); } } else { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] No info for class %s", info.name); } }
private static void dumpFields(final ClassInfo info, final Map<Integer, ClassInfo> map, final AtomicInteger seq, final DataInputStream dis, final BufferedWriter w, final int depth) throws IOException { if ((info.flags & SC_EXTERNALIZABLE) != 0) { printf(w, depth, "[--] Externalizable data block:"); dumpBlockData(map, seq, dis, w, depth + 1); } else if ((info.flags & SC_SERIALIZABLE) != 0) { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] Fields for class %s:", info.name); for (FieldInfo fieldInfo : info.info) { printf(w, depth + 1, "[--] Field %s = %s", fieldInfo.name, fieldInfo.type.getValueString(dis)); if (fieldInfo.type.isObject()) { dumpObject(map, seq, dis, w, depth + 2, dis.readUnsignedByte()); } } if ((info.flags & SC_WRITE_METHOD) != 0) { printf(w, depth, "[--] Custom data for class %s:", info.name); dumpBlockData(map, seq, dis, w, depth + 1); } } else { if (info.parent != null) { dumpFields(info.parent, map, seq, dis, w, depth); } printf(w, depth, "[--] No info for class %s", info.name); } }