diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2021-03-12 15:05:31 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-12 15:05:31 +0800 |
| commit | 17d02264f33f501e124060ade7b0b39e687aaa3d (patch) | |
| tree | 0b80a2d7bc9fd99d7b68e8c06080a9a062fffd35 /other/java/client/src | |
| parent | 620b91f23eaf5718088dc9ddcf91540967d0c8a6 (diff) | |
| parent | 5f99eee27c0f48ebc10e79241650be3727124af2 (diff) | |
| download | seaweedfs-17d02264f33f501e124060ade7b0b39e687aaa3d.tar.xz seaweedfs-17d02264f33f501e124060ade7b0b39e687aaa3d.zip | |
Merge pull request #74 from chrislusf/master
sync
Diffstat (limited to 'other/java/client/src')
| -rw-r--r-- | other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java index b73e99e69..ba298a713 100644 --- a/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java +++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java @@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InterruptedIOException; import java.io.OutputStream; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.util.concurrent.*; @@ -217,7 +218,7 @@ public class SeaweedOutputStream extends OutputStream { private synchronized int submitWriteBufferToService(final ByteBuffer bufferToWrite, final long writePosition) throws IOException { - bufferToWrite.flip(); + ((Buffer)bufferToWrite).flip(); int bytesLength = bufferToWrite.limit() - bufferToWrite.position(); if (threadExecutor.getQueue().size() >= maxConcurrentRequestCount) { |
