Override write(byte[] b, int off, int len) in FilterOutputStream for better performance

Closes #8748
This commit is contained in:
Simon Willnauer 2014-12-02 21:20:53 +01:00
parent 943dbb8ab6
commit d8f16178d3
1 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,10 @@ public class FsBlobContainer extends AbstractBlobContainer {
public OutputStream createOutput(String blobName) throws IOException {
final File file = new File(path, blobName);
return new BufferedOutputStream(new FilterOutputStream(new FileOutputStream(file)) {
@Override // FilterOutputStream#write(byte[] b, int off, int len) is trappy writes every single byte
public void write(byte[] b, int off, int len) throws IOException { out.write(b, off, len);}
@Override
public void close() throws IOException {
super.close();