class ObjectEntryReader implements CloseableIterator<ObjectEntry> {

    @Override
    public boolean hasNext() {
        // Last entry is a special EOF entry with null objectId.
        // If EOF is encountered before the EOF entry, then the stream is broken.
        if (!iterator.hasNext()) {
            throw new RuntimeException("Premature EOF");
        }
        String nextEntry = iterator.peek();
        return !EMPTY_ENTRY.equals(nextEntry);
    }

    public  ObjectEntryReader(InputStream inputStream);

}