Class FileTransporter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Transporter

    final class FileTransporter
    extends AbstractTransporter
    A transporter using File.
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • basedir

        private final java.io.File basedir
    • Method Detail

      • getBasedir

        java.io.File getBasedir()
      • classify

        public int classify​(java.lang.Throwable error)
        Description copied from interface: Transporter
        Classifies the type of exception that has been thrown from a previous request to the transporter. The exception types employed by a transporter are generally unknown to its caller. Where a caller needs to distinguish between certain error cases, it employs this method to detect which error case corresponds to the exception.
        Parameters:
        error - The exception to classify, must not be null.
        Returns:
        The classification of the error, either Transporter.ERROR_NOT_FOUND or Transporter.ERROR_OTHER.
      • implPeek

        protected void implPeek​(PeekTask task)
                         throws java.lang.Exception
        Description copied from class: AbstractTransporter
        Implements AbstractTransporter.peek(PeekTask), gets only called if the transporter has not been closed.
        Specified by:
        implPeek in class AbstractTransporter
        Parameters:
        task - The existence check to perform, must not be null.
        Throws:
        java.lang.Exception - If the existence of the specified resource could not be confirmed.
      • getFile

        private java.io.File getFile​(TransportTask task,
                                     boolean required)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception