You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: streaming_json_reader.rb
    path of file: ./repos/archivesspace/backend/app/lib
    
    the code of the file until where you have to start completion: # Reads a large file of JSON records in a manner that only keeps one record in
# memory at a time.

class StreamingJsonReader

  def initialize(filename)
    @filename = filename

    # The indexes of any records marked as deleted.  We'll skip those on
    # subsequent iterations.
    @deleted_entries = java.util.BitSet.new

    # The total number of records in the under
    
  def each
    return if empty?

    @record_index = -1
    with_record_stream do |stream|
      mapper = org.codehaus.jackson.map.ObjectMapper.new
      parser = mapper.getJsonFactory.createJsonParser(stream)

      while parser.nextToken
        @record_index += 1

        if @deleted_entries.get(@record_index)
          # Skip this entry
          parser.skipChildren
        else
          result = parser.readValueAs(java.util.Map.java_class)
          yield result
        end

        skip_comma(parser)
      end