Class StorageBinaryBody

    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Description copied from class: SingleBody
        Gets a InputStream which reads the bytes of the body.
        Specified by:
        getInputStream in class SingleBody
        Returns:
        the stream, transfer decoded
        Throws:
        java.io.IOException - on I/O errors.
      • writeTo

        public void writeTo​(java.io.OutputStream out)
                     throws java.io.IOException
        Description copied from class: SingleBody
        Writes this single body to the given stream. The default implementation copies the input stream obtained by SingleBody.getInputStream() to the specified output stream. May be overwritten by a subclass to improve performance.
        Overrides:
        writeTo in class SingleBody
        Parameters:
        out - the stream to write to.
        Throws:
        java.io.IOException - in case of an I/O error
      • copy

        public StorageBinaryBody copy()
        Description copied from class: SingleBody
        Returns a copy of this SingleBody (optional operation).

        The general contract of this method is as follows:

        • Invoking SingleBody.getParent() on the copy returns null. That means that the copy is detached from the parent entity of this SingleBody. The copy may get attached to a different entity later on.
        • The underlying content does not have to be copied. Instead it may be shared between multiple copies of a SingleBody.
        • If the underlying content is shared by multiple copies the implementation has to make sure that the content gets deleted when the last copy gets disposed of (and not before that).

        This implementation always throws an UnsupportedOperationException.

        Overrides:
        copy in class SingleBody
        Returns:
        a copy of this SingleBody.