public TarHeader readNextFileHeader() throws IOException {

        if(this.lastHeader != null) {
            throw new RuntimeException("Must first read file content of last entry");
        }

        // Read a complete File entry
        byte[] header = new byte[512];

        do {
            if(-1 == Util.readBlocking(header, inputStream)) {
                return null;
            }

            this.lastHeader = new TarHeader(header);

        } while(this.lastHeader == null);

        this.lastHeader = new TarHeader(header);

        return new TarHeader(header);
    }