Skip to content
Snippets Groups Projects
Commit 899ce3e3 authored by Paul-Christian Volkmer's avatar Paul-Christian Volkmer
Browse files

Use CHUNK_SIZE as static final member of class ImageUtils

No one will find it in method convertFileToByteArray.
parent c1f1b23b
Branches
Tags
No related merge requests found
......@@ -40,6 +40,9 @@ import org.slf4j.LoggerFactory;
*/
public final class ImageUtils {
// Or whatever size you want to read in at a time.
private final static int CHUNK_SIZE = 4096;
private ImageUtils() {
}
......@@ -107,8 +110,7 @@ public final class ImageUtils {
* @return The <code>byte[]</code> of the image on success, otherwise <code>null</code>.
*/
public static byte[] convertFileToByteArray(final String imageUrl) {
// Or whatever size you want to read in at a time.
final int CHUNK_SIZE = 4096;
try {
final URL url = new URL(imageUrl);
......
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