With the following logic used to copy a file using input/output streams. Is there truly a benefit of using the Bufferred Streams since it is using a byte buffer of the same size?
int bufferSize = getDefaultBufferSize();
input = new BufferedInputStream(in, bufferSize);
output = new BufferedOutputStream(out, bufferSize);
byte[] buffer = new byte[bufferSize];
int numBytes = 0;
long totalBytes = 0L;
while ((numBytes = input.read(buffer)) != -1) {
output.write(buffer, 0, numBytes);
totalBytes += numBytes;
}
output.flush();
inandoutdirectly?