Class UrlPart

    • Field Detail

      • contentLength

        public long contentLength
        the content length of this UrlPart
    • Constructor Detail

      • UrlPart

        public UrlPart​(java.net.HttpURLConnection connection)
                throws java.io.IOException
        Parameters:
        connection -
        Throws:
        java.io.IOException
      • UrlPart

        public UrlPart​(java.net.URLConnection connection,
                       boolean isHttp)
                throws java.io.IOException
        Parameters:
        connection -
        isHttp -
        Throws:
        java.io.IOException
      • UrlPart

        public UrlPart​(javax.mail.BodyPart part)
                throws javax.mail.MessagingException,
                       java.io.IOException
        Parameters:
        part -
        Throws:
        javax.mail.MessagingException
        java.io.IOException
      • UrlPart

        public UrlPart​(java.io.File f)
                throws java.io.IOException
        Parameters:
        f -
        Throws:
        java.io.IOException
    • Method Detail

      • getResponseCode

        public int getResponseCode()
        Description copied from interface: IPollDetails
        get the new response code (e.g. 200 for success)
        Specified by:
        getResponseCode in interface IPollDetails
        Returns:
        the response code
      • writeStream

        public void writeStream​(java.io.OutputStream os)
                         throws java.io.IOException
        Description copied from interface: IStreamWriter
        write myself to a stream
        Specified by:
        writeStream in interface IStreamWriter
        Parameters:
        os - the output stream
        Throws:
        java.io.IOException - if io snafu...
      • getContentType

        public java.lang.String getContentType()
        Description copied from interface: IPollDetails
        get the content type of the polled stuff
        Specified by:
        getContentType in interface IPollDetails
        Returns:
        the contentType
      • setInStream

        public void setInStream​(java.io.InputStream inStream)
        Parameters:
        inStream - the inStream to set
      • getResponseString

        public java.lang.String getResponseString​(int maxLen)
        Parameters:
        maxLen -
        Returns:
      • getXMLDoc

        public XMLDoc getXMLDoc()
        returns an xmldoc corresponding to this part
        Returns:
        the doc, null if not xml
      • buffer

        public void buffer()
        buffer my input stream
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation
        See Also:
        Object.toString()
      • getConnection

        public java.net.URLConnection getConnection()
        Returns:
        the connection
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • isReturnCodeOK

        public static boolean isReturnCodeOK​(UrlPart p)
      • getReturnCode

        public static int getReturnCode​(UrlPart p)