@author Fred Toussi (fredt@users dot sourceforge.net) @version 1.9.0 @since 1.9.0
129130131132133134135136137138139
return 0; } public int setString(SessionInterface session, long pos, String str) { ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos, str.toCharArray()); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException();
147148149150151152153154155156157
if (!isInLimits(str.length(), offset, len)) { throw Error.error(ErrorCode.X_22001); } ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos, str.substring(offset, len).toCharArray()); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException();
173174175176177178179180181182183
System.arraycopy(chars, offset, newChars, 0, len); chars = newChars; } ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos, chars); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException(); }
186187188189190191192193194195196
} public long position(SessionInterface session, String searchstr, long start) { ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id, searchstr.toCharArray(), start); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException();
199200201202203204205206207208209
return ((ResultLob) resultIn).getOffset(); } public long position(SessionInterface session, ClobData searchstr, long start) { ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id, searchstr.getId(), start); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException();
211212213214215216217218219220221
return ((ResultLob) resultIn).getOffset(); } public long nonSpaceLength(SessionInterface session) { ResultLob resultOut = ResultLob.newLobGetTruncateLength(id); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException(); }
7778798081828384858687
return null; } public byte[] getBytes(SessionInterface session, long pos, int length) { ResultLob resultOut = ResultLob.newLobGetBytesRequest(id, pos, length); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw Error.error(resultIn); }
8990919293949596979899
return ((ResultLob) resultIn).getByteArray(); } public BlobData getBlob(SessionInterface session, long pos, long length) { ResultLob resultOut = ResultLob.newLobGetRequest(id, pos, length); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw Error.error(resultIn); }
123124125126127128129130131132133
if (length > -1) { return length; } ResultLob resultOut = ResultLob.newLobGetLengthRequest(id); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException(); }
145146147148149150151152153154155
return false; } public long position(SessionInterface session, BlobData pattern, long start) { ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id, pattern.getId(), start); Result resultIn = session.execute(resultOut); if (resultIn.isError()) { throw resultIn.getException();