- // Define the file size long.
- long fileSize;
-
- // Make sure the content length isn't null.
- if (contentLengthString != null) { // The content length isn't null.
- // Convert the content length to a long.
- fileSize = Long.parseLong(contentLengthString);
+ // Only process the content length string if it isn't null.
+ if (contentLengthString != null) {
+ // Convert the content length string to a long.
+ long fileSize = Long.parseLong(contentLengthString);