Class BlobRelay

  • All Implemented Interfaces:
    Relay<java.sql.Blob>, java.sql.Blob

    public class BlobRelay
    extends java.lang.Object
    implements Relay<java.sql.Blob>, java.sql.Blob
    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.impossibl.jdbc.spy.BlobListener listener  
      java.sql.Blob target  
    • Constructor Summary

      Constructors 
      Constructor Description
      BlobRelay​(java.sql.Blob target, com.impossibl.jdbc.spy.BlobListener listener)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void free()  
      java.io.InputStream getBinaryStream()  
      java.io.InputStream getBinaryStream​(long pos, long length)  
      byte[] getBytes​(long pos, int length)  
      java.sql.Blob getTarget()  
      long length()  
      long position​(byte[] pattern, long start)  
      long position​(java.sql.Blob pattern, long start)  
      java.io.OutputStream setBinaryStream​(long pos)  
      int setBytes​(long pos, byte[] bytes)  
      int setBytes​(long pos, byte[] bytes, int offset, int len)  
      void truncate​(long len)  
      • Methods inherited from class java.lang.Object

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

      • target

        public java.sql.Blob target
      • listener

        public com.impossibl.jdbc.spy.BlobListener listener
    • Constructor Detail

      • BlobRelay

        public BlobRelay​(java.sql.Blob target,
                         com.impossibl.jdbc.spy.BlobListener listener)
    • Method Detail

      • getTarget

        public java.sql.Blob getTarget()
        Specified by:
        getTarget in interface Relay<java.sql.Blob>
      • position

        public long position​(byte[] pattern,
                             long start)
                      throws java.sql.SQLException
        Specified by:
        position in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • truncate

        public void truncate​(long len)
                      throws java.sql.SQLException
        Specified by:
        truncate in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • getBytes

        public byte[] getBytes​(long pos,
                               int length)
                        throws java.sql.SQLException
        Specified by:
        getBytes in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • length

        public long length()
                    throws java.sql.SQLException
        Specified by:
        length in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • getBinaryStream

        public java.io.InputStream getBinaryStream()
                                            throws java.sql.SQLException
        Specified by:
        getBinaryStream in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • getBinaryStream

        public java.io.InputStream getBinaryStream​(long pos,
                                                   long length)
                                            throws java.sql.SQLException
        Specified by:
        getBinaryStream in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • free

        public void free()
                  throws java.sql.SQLException
        Specified by:
        free in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public java.io.OutputStream setBinaryStream​(long pos)
                                             throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • setBytes

        public int setBytes​(long pos,
                            byte[] bytes,
                            int offset,
                            int len)
                     throws java.sql.SQLException
        Specified by:
        setBytes in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • position

        public long position​(java.sql.Blob pattern,
                             long start)
                      throws java.sql.SQLException
        Specified by:
        position in interface java.sql.Blob
        Throws:
        java.sql.SQLException
      • setBytes

        public int setBytes​(long pos,
                            byte[] bytes)
                     throws java.sql.SQLException
        Specified by:
        setBytes in interface java.sql.Blob
        Throws:
        java.sql.SQLException