|
@@ -99,7 +99,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public synchronized void write(int b) throws IOException {
|
|
|
+ public void write(int b) throws IOException {
|
|
|
checkOpen();
|
|
|
int rollbackPosition = buffer.position();
|
|
|
int rollbackLimit = buffer.limit();
|
|
@@ -110,7 +110,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public synchronized void write(byte[] b, int off, int len)
|
|
|
+ public void write(byte[] b, int off, int len)
|
|
|
throws IOException {
|
|
|
if (b == null) {
|
|
|
throw new NullPointerException();
|
|
@@ -137,7 +137,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public synchronized void flush() throws IOException {
|
|
|
+ public void flush() throws IOException {
|
|
|
checkOpen();
|
|
|
if (buffer.position() > 0) {
|
|
|
int rollbackPosition = buffer.position();
|
|
@@ -147,7 +147,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public synchronized void close() throws IOException {
|
|
|
+ public void close() throws IOException {
|
|
|
if (xceiverClientManager != null && xceiverClient != null
|
|
|
&& buffer != null) {
|
|
|
if (buffer.position() > 0) {
|
|
@@ -164,7 +164,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public synchronized void cleanup() {
|
|
|
+ public void cleanup() {
|
|
|
xceiverClientManager.releaseClient(xceiverClient);
|
|
|
xceiverClientManager = null;
|
|
|
xceiverClient = null;
|
|
@@ -176,7 +176,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
*
|
|
|
* @throws IOException if stream is closed
|
|
|
*/
|
|
|
- private synchronized void checkOpen() throws IOException {
|
|
|
+ private void checkOpen() throws IOException {
|
|
|
if (xceiverClient == null) {
|
|
|
throw new IOException("ChunkOutputStream has been closed.");
|
|
|
}
|
|
@@ -191,7 +191,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
* @param rollbackLimit limit to restore in buffer if write fails
|
|
|
* @throws IOException if there is an I/O error while performing the call
|
|
|
*/
|
|
|
- private synchronized void flushBufferToChunk(int rollbackPosition,
|
|
|
+ private void flushBufferToChunk(int rollbackPosition,
|
|
|
int rollbackLimit) throws IOException {
|
|
|
boolean success = false;
|
|
|
try {
|
|
@@ -213,7 +213,7 @@ public class ChunkOutputStream extends OutputStream {
|
|
|
*
|
|
|
* @throws IOException if there is an I/O error while performing the call
|
|
|
*/
|
|
|
- private synchronized void writeChunkToContainer() throws IOException {
|
|
|
+ private void writeChunkToContainer() throws IOException {
|
|
|
buffer.flip();
|
|
|
ByteString data = ByteString.copyFrom(buffer);
|
|
|
ChunkInfo chunk = ChunkInfo
|