public synchronized void seekTo(boolean flag, int i, RandomAccessFile randomaccessfile) throws IOException { if(!flag) return; if(i < 0 || i > 0x3c00000) { System.out.println("Badseek - pos:" + i + " len:" + randomaccessfile.length()); i = 0x3c00000; try { Thread.sleep(1000L); } catch(Exception _ex) { } } randomaccessfile.seek(i);