private Entity readFromFile(int pos) {
        ObjectInputStream ois = null;
        Entity rslt = null;
        try {
            ois = new ObjectInputStream(new FileInputStream(file));
            for (int i = 0; i < pos; i++) {
                ois.readObject();
            }
            rslt = (Entity) ois.readObject();
        } catch (Exception ex) {
            Logger.getLogger(FileStorage.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                if (ois != null) {
                    ois.close();
                }
            } catch (IOException ex) {
                Logger.getLogger(FileStorage.class.getName()).log(Level.SEVERE, null, ex);
            }
            return rslt;
        }
    }