/** * Iterates over the entire stream of data. * * @param offset * The location in the storage file to begin reading. * @return An iterator for reading objects from the data store. This * iterator must be released after use. */ public Iterator<T> iterate(long offset) { seek(offset); return new ObjectDataInputIterator<T>(objectReader); }
/** * Reads the object at the specified file offset. * * @param offset * The file offset to read an object from. * @return The requested object. */ @SuppressWarnings("unchecked") public T get(long offset) { seek(offset); return (T) objectReader.readObject(); }
/** * Reads the object at the specified file offset. * * @param offset * The file offset to read an object from. * @return The requested object. */ @SuppressWarnings("unchecked") public T get(long offset) { seek(offset); return (T) objectReader.readObject(); }
/** * Iterates over the entire stream of data. * * @param offset * The location in the storage file to begin reading. * @return An iterator for reading objects from the data store. This * iterator must be released after use. */ public Iterator<T> iterate(long offset) { seek(offset); return new ObjectDataInputIterator<T>(objectReader); }