diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2006-10-01 02:49:30 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2006-10-01 02:49:30 +0000 |
commit | 17cac5d7afae1fcc0461f725fdb5a074c1f71ea1 (patch) | |
tree | 9542dabd75e532b2c12151c502823a43c217d8f5 /src/main/java/com | |
parent | a3812492c559e198076767358f6d5fb836dde93d (diff) |
Support proper initial position.
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCBlob.java | 7 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCClob.java | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCBlob.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCBlob.java index 44612bd..d84d033 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCBlob.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCBlob.java @@ -63,7 +63,7 @@ class JDBCBlob extends AbstractBlob implements JDBCLob { if (pos == 0) {
return getInternalBlobForFetch().getBinaryStream();
}
- return new Input(getInternalBlobForFetch(), DEFAULT_BUFFER);
+ return new Input(getInternalBlobForFetch(), DEFAULT_BUFFER, pos);
} catch (SQLException e) {
throw mRepo.toFetchException(e);
}
@@ -77,7 +77,7 @@ class JDBCBlob extends AbstractBlob implements JDBCLob { if (bufferSize <= 0) {
bufferSize = DEFAULT_BUFFER;
}
- return new Input(getInternalBlobForFetch(), bufferSize);
+ return new Input(getInternalBlobForFetch(), bufferSize, pos);
} catch (SQLException e) {
throw mRepo.toFetchException(e);
}
@@ -162,9 +162,10 @@ class JDBCBlob extends AbstractBlob implements JDBCLob { private byte[] mBuffer;
private int mBufferPos;
- Input(java.sql.Blob blob, int bufferSize) {
+ Input(java.sql.Blob blob, int bufferSize, long pos) {
mBlob = blob;
mBufferSize = bufferSize;
+ mPos = pos;
}
public int read() throws IOException {
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCClob.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCClob.java index 95c8966..70ce7f9 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCClob.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCClob.java @@ -63,7 +63,7 @@ class JDBCClob extends AbstractClob implements JDBCLob { if (pos == 0) {
return getInternalClobForFetch().getCharacterStream();
}
- return new Input(getInternalClobForFetch(), DEFAULT_BUFFER);
+ return new Input(getInternalClobForFetch(), DEFAULT_BUFFER, pos);
} catch (SQLException e) {
throw mRepo.toFetchException(e);
}
@@ -77,7 +77,7 @@ class JDBCClob extends AbstractClob implements JDBCLob { if (bufferSize <= 0) {
bufferSize = DEFAULT_BUFFER;
}
- return new Input(getInternalClobForFetch(), bufferSize);
+ return new Input(getInternalClobForFetch(), bufferSize, pos);
} catch (SQLException e) {
throw mRepo.toFetchException(e);
}
@@ -162,9 +162,10 @@ class JDBCClob extends AbstractClob implements JDBCLob { private String mBuffer;
private int mBufferPos;
- Input(java.sql.Clob clob, int bufferSize) {
+ Input(java.sql.Clob clob, int bufferSize, long pos) {
mClob = clob;
mBufferSize = bufferSize;
+ mPos = pos;
}
public int read() throws IOException {
|