// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import java.io.FileInputStream;
import java.io.InputStream;

public class SeqBlk {
    public static void main(String[] args) throws Exception {
        System.out.println("Java (blocks) - " + args[0]);
        InputStream is = new FileInputStream(args[0]);
        byte[] buf = new byte[512];
        int n;
        while((n  = is.read(buf)) > 0) {
            for(int i = 0; i < n; i++) {
                if(buf[i] == '\n')
                    System.out.printf("\n");
                else
                    System.out.printf("%02X", buf[i]);
            }
        }
        is.close();
    }
}
