Skip to content

Commit

Permalink
set visibility of Streams' static members
Browse files Browse the repository at this point in the history
  • Loading branch information
bigerl committed Apr 12, 2021
1 parent db7fae5 commit 5b1266e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
*/
public class Streams {

final static int bufferSize = 16 * 1024 * 1024; // 16 MB buffer
public static final int bufferSize = 16 * 1024 * 1024; // 16 MB buffer

final static ThreadLocal<byte[]> threadBuffer = ThreadLocal.withInitial(() -> new byte[bufferSize]);
protected static final ThreadLocal<byte[]> threadBuffer = ThreadLocal.withInitial(() -> new byte[bufferSize]);

final static ThreadLocal<ByteArrayOutputStream> threadByteArrayOutputStream = ThreadLocal.withInitial(() -> new ByteArrayOutputStream(bufferSize));
protected static final ThreadLocal<ByteArrayOutputStream> threadByteArrayOutputStream = ThreadLocal.withInitial(() -> new ByteArrayOutputStream(bufferSize));

/**
* Fastest way to serialize a stream to UTF-8 according to https://stackoverflow.com/a/35446009/6800941
Expand Down

0 comments on commit 5b1266e

Please sign in to comment.