Class MultipartStream.ProgressNotifier

  • Enclosing class:
    MultipartStream

    public static class MultipartStream.ProgressNotifier
    extends java.lang.Object
    Internal class, which is used to invoke the ProgressListener.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long bytesRead
      Number of bytes, which have been read so far.
      private long contentLength
      Number of expected bytes, if known, or -1.
      private int items
      Number of items, which have been read so far.
      private ProgressListener listener
      The listener to invoke.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProgressNotifier​(ProgressListener pListener, long pContentLength)
      Creates a new instance with the given listener and content length.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void noteBytesRead​(int pBytes)
      Called to indicate that bytes have been read.
      (package private) void noteItem()
      Called to indicate, that a new file item has been detected.
      private void notifyListener()
      Called for notifying the listener.
      • Methods inherited from class java.lang.Object

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

      • contentLength

        private final long contentLength
        Number of expected bytes, if known, or -1.
      • bytesRead

        private long bytesRead
        Number of bytes, which have been read so far.
      • items

        private int items
        Number of items, which have been read so far.
    • Constructor Detail

      • ProgressNotifier

        ProgressNotifier​(ProgressListener pListener,
                         long pContentLength)
        Creates a new instance with the given listener and content length.
        Parameters:
        pListener - The listener to invoke.
        pContentLength - The expected content length.
    • Method Detail

      • noteBytesRead

        void noteBytesRead​(int pBytes)
        Called to indicate that bytes have been read.
        Parameters:
        pBytes - Number of bytes, which have been read.
      • noteItem

        void noteItem()
        Called to indicate, that a new file item has been detected.
      • notifyListener

        private void notifyListener()
        Called for notifying the listener.