I want to read data from a .jpg file (header, DCT information, Huffman table, quantization table, ...)
I tried this piece of code but I'm not sure if it's correct (in fact I don't know what to get!)
byte[] my = new byte[5];
    try 
    {
        RandomAccessFile file = new RandomAccessFile("001.jpg", "rw");
        file.read(my, 0, 5);
        for(int i = 0; i < my.length; i++)
            System.out.printf("%s\n", my[i]);
    } 
    catch (IOException e) 
    {
    }
This code just prints some number (it's supposed to be beginning of the image)
 
     
    