Code example for RandomAccessFile

Methods: readUnsignedShortseek

0
        logger = Logger.getLogger(this.getClass().getName());
    } 
 
    @Override 
    public boolean canHandle(RandomAccessFile raf, File file) throws IOException {
        raf.seek(0);
        int b1 = raf.readUnsignedShort();
        if (b1 == 0xFFD8) {
            return true; 
        } 
        return false; 
    } 
 
    @Override 
    public String rename(RandomAccessFile raf, File file) throws IOException {
        String name = null;
        Map<String, Object> map = new HashMap<String, Object>();
        boolean lendian = false;
        raf.seek(2);
        //long exifOffset = raf.getFilePointer(); 
Stop searching for code, let great code find you!  Add Codota to your java IDE