Commit aea18767 authored by Eric Bruneton's avatar Eric Bruneton
Browse files

Fix typos.

parent 08b54b42
......@@ -314,7 +314,7 @@ public class ClassReader {
if (inputStream == null) {
throw new IOException("Class not found");
}
int bufferSize = calculateBufferSize(inputStream);
int bufferSize = computeBufferSize(inputStream);
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
byte[] data = new byte[bufferSize];
int bytesRead;
......@@ -335,12 +335,12 @@ public class ClassReader {
}
}
private static int calculateBufferSize(final InputStream inputStream) throws IOException {
private static int computeBufferSize(final InputStream inputStream) throws IOException {
int expectedLength = inputStream.available();
/*
* Some implementations can return 0 while holding available data (e.g. new
* FileInputStream("/proc/a_file")) Also in some pathological cases a very small number might be
* returned, and in this case we use default size
* FileInputStream("/proc/a_file")). Also in some pathological cases a very small number might
* be returned, and in this case we use a default size.
*/
if (expectedLength < 256) {
return INPUT_STREAM_DATA_CHUNK_SIZE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment