org.sourceforge.jxutil.sql.type
Class DefaultBLOB
java.lang.Object
|
+--org.sourceforge.jxutil.sql.type.AbstractBLOB
|
+--org.sourceforge.jxutil.sql.type.DefaultBLOB
- All Implemented Interfaces:
- Blob
- public class DefaultBLOB
- extends AbstractBLOB
This type stores BLOB in a byte buffer.
Read only access.
Field Summary |
private byte[] |
buf
|
Method Summary |
byte[] |
getBytes(long pos,
int length)
|
long |
length()
|
long |
position(Blob pattern,
long start)
|
long |
position(byte[] pattern,
long start)
|
int |
setBytes(long pos,
byte[] dta)
Writes the array of bytes bytes to this Blob object starting at
position pos. |
int |
setBytes(long pos,
byte[] dta,
int ofs,
int len)
|
void |
truncate(long pos)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buf
private final byte[] buf
DefaultBLOB
public DefaultBLOB(byte[] buf)
getBytes
public byte[] getBytes(long pos,
int length)
length
public long length()
position
public long position(Blob pattern,
long start)
position
public long position(byte[] pattern,
long start)
setBytes
public int setBytes(long pos,
byte[] dta)
- Description copied from class:
AbstractBLOB
- Writes the array of bytes bytes to this Blob object starting at
position pos.
- Specified by:
setBytes
in interface Blob
- Specified by:
setBytes
in class AbstractBLOB
- Parameters:
pos
- the position in the BLOB object at which to start writingdta
- the array of bytes to be written to the BLOB value that
this Blob object represents
- Returns:
- the number of bytes written
setBytes
public int setBytes(long pos,
byte[] dta,
int ofs,
int len)
truncate
public void truncate(long pos)
Copyright © 2001,2002 Keve Müller, et al.; see LICENSE file for details.