Class BlobProxy

    • Method Detail

      • generateProxy

        public static Blob generateProxy​(byte[] bytes)
        Generates a BlobImpl using byte data.
        Parameters:
        bytes - The data to be created as a Blob.
        Returns:
        The BlobProxy instance to represent this data.
      • generateProxy

        public static Blob generateProxy​(InputStream stream,
                                         long length)
        Generates a BlobImpl proxy using a given number of bytes from an InputStream. Be aware that certain database drivers will automatically close the provided InputStream after the contents have been written to the database. This may cause unintended side effects if the entity is also audited by Envers. In this case, it's recommended to use generateProxy(byte[]) instead as it isn't affected by this non-standard behavior.
        Parameters:
        stream - The input stream of bytes to be created as a Blob.
        length - The number of bytes from stream to be written to the Blob.
        Returns:
        The BlobProxy instance to represent this data.
      • position

        public long position​(byte[] pattern,
                             long start)
        Specified by:
        position in interface Blob
      • position

        public long position​(Blob pattern,
                             long start)
        Specified by:
        position in interface Blob
      • setBytes

        public int setBytes​(long pos,
                            byte[] bytes)
        Specified by:
        setBytes in interface Blob
      • setBytes

        public int setBytes​(long pos,
                            byte[] bytes,
                            int offset,
                            int len)
        Specified by:
        setBytes in interface Blob
      • truncate

        public void truncate​(long len)
        Specified by:
        truncate in interface Blob
      • free

        public void free()
        Specified by:
        free in interface Blob