Class TempFileInput


  • public class TempFileInput
    extends BinaryInput
    This class represents a temporary file data input stream. Call the "done" method to clean up the file when done. NOTE: The implied flow of this method is to be handled a file that has already been created by some means. The file must be a dedicated temporary file, which can be destroyed when the data has been used.
    • Field Detail

      • file

        protected java.io.File file
      • inMemoryBuffer

        protected byte[] inMemoryBuffer
    • Constructor Detail

      • TempFileInput

        public TempFileInput​(java.io.InputStream is)
                      throws ManifoldCFException,
                             java.io.IOException
        Construct from an input stream. This will also create a temporary, backing file.
        Parameters:
        is - is the input stream to use to construct the temporary file.
        Throws:
        ManifoldCFException
        java.io.IOException
      • TempFileInput

        public TempFileInput​(java.io.InputStream is,
                             long length)
                      throws ManifoldCFException,
                             java.io.IOException
        Construct from a length-delimited input stream.
        Parameters:
        is - is the input stream.
        length - is the maximum number of bytes to transfer, or -1 if no limit.
        Throws:
        ManifoldCFException
        java.io.IOException
      • TempFileInput

        public TempFileInput​(java.io.InputStream is,
                             long length,
                             int maxMemSize)
                      throws ManifoldCFException,
                             java.io.IOException
        Construct from a length-delimited input stream.
        Parameters:
        is - is the input stream.
        length - is the maximum number of bytes to transfer, or -1 if no limit.
        maxMemSize - is the maximum bytes we keep in memory in lieu of using a file.
        Throws:
        ManifoldCFException
        java.io.IOException
      • TempFileInput

        public TempFileInput​(java.io.File tempFile)
        Construct from an existing temporary fle.
        Parameters:
        tempFile - is the existing temporary file.
      • TempFileInput

        protected TempFileInput()