Class BinaryImpl

  • All Implemented Interfaces:
    Binary

    public class BinaryImpl
    extends java.lang.Object
    implements Binary
    BinaryImpl implements the Binary interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      BinaryImpl​(byte[] buffer)
      Creates a new BinaryImpl instance from a byte[] array.
      BinaryImpl​(java.io.InputStream in)
      Creates a new BinaryImpl instance from an InputStream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      long getSize()
      java.io.InputStream getStream()
      int read​(byte[] b, long position)
      • Methods inherited from class java.lang.Object

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

      • BinaryImpl

        public BinaryImpl​(java.io.InputStream in)
                   throws java.io.IOException
        Creates a new BinaryImpl instance from an InputStream. The contents of the stream is spooled to a temporary file or to a byte buffer if its size is smaller than MAX_BUFFER_SIZE.

        Parameters:
        in - stream to be represented as a BLOBFileValue instance
        Throws:
        java.io.IOException - if an error occurs while reading from the stream or writing to the temporary file
      • BinaryImpl

        public BinaryImpl​(byte[] buffer)
        Creates a new BinaryImpl instance from a byte[] array.
        Parameters:
        buffer - byte array to be represented as a BinaryImpl instance