Skip to content

Commit 60e021b

Browse files
Simon WebbMarcus Linke
authored andcommitted
Added override for bulk-read variant of InputStream.read() in anonymous
inner class created by Dockerfile.ScannedResult.buildDockerFolderTar(). This fixes an IO performance issue that occurs when only the single-byte variant of the read() method on InputStream is overriden.
1 parent 45aa177 commit 60e021b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/com/github/dockerjava/core/dockerfile/Dockerfile.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ public int read() throws IOException {
142142
return tarInputStream.read();
143143
}
144144

145+
@Override
146+
public int read(byte [] buff, int offset, int len) throws IOException {
147+
return tarInputStream.read(buff, offset, len);
148+
}
149+
145150
@Override
146151
public void close() throws IOException {
147152
IOUtils.closeQuietly(tarInputStream);

0 commit comments

Comments
 (0)