Class IncomingAttachmentStreams.IncomingAttachmentInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    IncomingAttachmentStreams

    public final class IncomingAttachmentStreams.IncomingAttachmentInputStream
    extends java.io.InputStream
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHeader​(java.lang.String name, java.lang.String value)
      Add a header.
      java.lang.String getContentId()  
      java.lang.String getContentLocation()  
      java.lang.String getContentType()  
      java.lang.String getHeader​(java.lang.String name)
      Get a header value.
      java.util.Map getHeaders()  
      void mark​(int readLimit)  
      boolean markSupported()
      Don't want to support mark and reset since this may get us into concurrency problem when different pieces of software may have a handle to the underlying InputStream.
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      void reset()  
      • Methods inherited from class java.io.InputStream

        available, close, nullInputStream, readAllBytes, readNBytes, readNBytes, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • IncomingAttachmentInputStream

        public IncomingAttachmentInputStream​(java.io.InputStream in)
        Parameters:
        in -
    • Method Detail

      • getHeaders

        public java.util.Map getHeaders()
        Returns:
        MIME headers for this attachment. May be null if no headers were set.
      • addHeader

        public void addHeader​(java.lang.String name,
                              java.lang.String value)
        Add a header.
        Parameters:
        name -
        value -
      • getHeader

        public java.lang.String getHeader​(java.lang.String name)
        Get a header value.
        Parameters:
        name -
        Returns:
        The header found or null if not found.
      • getContentId

        public java.lang.String getContentId()
        Returns:
        The header with HTTPConstants.HEADER_CONTENT_ID as the key.
      • getContentLocation

        public java.lang.String getContentLocation()
        Returns:
        The header with HTTPConstants.HEADER_CONTENT_LOCATION as the key.
      • getContentType

        public java.lang.String getContentType()
        Returns:
        The header with HTTPConstants.HEADER_CONTENT_TYPE as the key.
      • markSupported

        public boolean markSupported()
        Don't want to support mark and reset since this may get us into concurrency problem when different pieces of software may have a handle to the underlying InputStream.
        Overrides:
        markSupported in class java.io.InputStream
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class java.io.InputStream
        Throws:
        java.io.IOException
      • mark

        public void mark​(int readLimit)
        Overrides:
        mark in class java.io.InputStream
      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException