MyOD
内容
编写MyOD.java 用java MyOD XXX实现Linux下od -tx -tc XXX的功能
import java.io.*;import java.util.Scanner;/***Created by xinag on 2018/6/10.*/public class MyOD { public static void dump(InputStream src) throws IOException { try (InputStream input = src) { byte[][] data = new byte[50][1]; byte[][] transf = new byte[50][1]; int i=0, j=0, num; System.out.print("00010: "); while (input.read(data[i]) != -1) { num = (int)data[i][0]; System.out.printf("%5s", Integer.toHexString(num)); i++; } System.out.print("\n00020: "); while (j