001: /*
002: * HA-JDBC: High-Availability JDBC
003: * Copyright (c) 2004-2007 Paul Ferraro
004: *
005: * This library is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU Lesser General Public License as published by the
007: * Free Software Foundation; either version 2.1 of the License, or (at your
008: * option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful, but WITHOUT
011: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
012: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
013: * for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public License
016: * along with this library; if not, write to the Free Software Foundation,
017: * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: *
019: * Contact: ferraro@users.sourceforge.net
020: */
021: package net.sf.hajdbc.sql;
022:
023: import java.io.InputStream;
024: import java.io.OutputStream;
025: import java.sql.Blob;
026:
027: /**
028: * @author Paul Ferraro
029: *
030: */
031: public class MockBlob implements Blob {
032: /**
033: * @see java.sql.Blob#free()
034: */
035: public void free() {
036: }
037:
038: /**
039: * @see java.sql.Blob#getBinaryStream()
040: */
041: public InputStream getBinaryStream() {
042: return null;
043: }
044:
045: /**
046: * @see java.sql.Blob#getBinaryStream(long, long)
047: */
048: public InputStream getBinaryStream(long arg0, long arg1) {
049: return null;
050: }
051:
052: /**
053: * @see java.sql.Blob#getBytes(long, int)
054: */
055: public byte[] getBytes(long arg0, int arg1) {
056: return null;
057: }
058:
059: /**
060: * @see java.sql.Blob#length()
061: */
062: public long length() {
063: return 0;
064: }
065:
066: /**
067: * @see java.sql.Blob#position(byte[], long)
068: */
069: public long position(byte[] arg0, long arg1) {
070: return 0;
071: }
072:
073: /**
074: * @see java.sql.Blob#position(java.sql.Blob, long)
075: */
076: public long position(Blob arg0, long arg1) {
077: return 0;
078: }
079:
080: /**
081: * @see java.sql.Blob#setBinaryStream(long)
082: */
083: public OutputStream setBinaryStream(long arg0) {
084: return null;
085: }
086:
087: /**
088: * @see java.sql.Blob#setBytes(long, byte[])
089: */
090: public int setBytes(long arg0, byte[] arg1) {
091: return 0;
092: }
093:
094: /**
095: * @see java.sql.Blob#setBytes(long, byte[], int, int)
096: */
097: public int setBytes(long arg0, byte[] arg1, int arg2, int arg3) {
098: return 0;
099: }
100:
101: /**
102: * @see java.sql.Blob#truncate(long)
103: */
104: public void truncate(long arg0) {
105: }
106: }
|