Class DirectoryResults

java.lang.Object
jp.cssj.cti2.results.DirectoryResults
All Implemented Interfaces:
Results

public class DirectoryResults extends Object implements Results
A Results implementation that outputs multiple results to a directory.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected final File
     
    protected final String
     
    protected final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DirectoryResults(File dir, String prefix, String suffix)
    Constructs an object with the specified output directory and file name prefix and suffix.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    end()
    Completes the sequence of data outputs.
    boolean
    Returns true if the next result can be output.
    net.zamasoft.zstream.io.FragmentedOutput
    nextBuilder(net.zamasoft.zstream.resolver.SourceMetadata metaSource)
    Returns a builder for constructing the next processing result.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • dir

      protected final File dir
    • prefix

      protected final String prefix
    • suffix

      protected final String suffix
    • counter

      protected int counter
  • Constructor Details

    • DirectoryResults

      public DirectoryResults(File dir, String prefix, String suffix)
      Constructs an object with the specified output directory and file name prefix and suffix.

      Outputs files to dir, with file names formed by concatenating prefix, a sequence number starting at 1, and suffix.

      Parameters:
      dir - The output directory.
      prefix - The string to prepend to the file name.
      suffix - The string to append to the file name.
  • Method Details

    • hasNext

      public boolean hasNext()
      Description copied from interface: Results
      Returns true if the next result can be output.
      Specified by:
      hasNext in interface Results
      Returns:
      true if the next result can be output; false otherwise.
    • nextBuilder

      public net.zamasoft.zstream.io.FragmentedOutput nextBuilder(net.zamasoft.zstream.resolver.SourceMetadata metaSource)
      Description copied from interface: Results
      Returns a builder for constructing the next processing result.
      Specified by:
      nextBuilder in interface Results
      Returns:
      The data builder object.
    • end

      public void end()
      Description copied from interface: Results
      Completes the sequence of data outputs.

      For a normal conversion, this is called once after all result builders are closed. For continuous conversion, it is not called for individual transcode calls, but is called once at the final join.

      Specified by:
      end in interface Results