PartSource (HttpClient Library (Version 3.1))
Date: 2018-05-07

org.apache.commons.httpclient.methods.multipart

## Interface PartSource

- All Known Implementing Classes:
    ByteArrayPartSource, FilePartSource

      public interface PartSource

  An interface for providing access to data when posting MultiPart messages.
  Since:
    2.0
  Author:
    Michael Becke
  See Also:
    `FilePart`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.InputStream` | `createInputStream()` Gets a new InputStream for reading this source.
    `java.lang.String` | `getFileName()` Gets the name of the file this source represents.
    `long` | `getLength()` Gets the number of bytes contained in this source.

- - ### Method Detail

    - #### getLength

          long getLength()

      Gets the number of bytes contained in this source.
      Returns:
        a value >= 0

    - #### getFileName

          java.lang.String getFileName()

      Gets the name of the file this source represents.
      Returns:
        the fileName used for posting a MultiPart file part

    - #### createInputStream

          java.io.InputStream createInputStream()
                                                throws java.io.IOException

      Gets a new InputStream for reading this source. This method can be called more than once and should therefore return a new stream every time.
      Returns:
        a new InputStream
      Throws:
        `java.io.IOException` - if an error occurs when creating the InputStream

Copyright (c) 1999-2005 - Apache Software Foundation