X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Ffcp%2FAllData.java;h=37ffa0812b58210cfacf6fa6b9b83dc43e59e539;hb=ebf4d1a0fb0f7e00e5aff798270dd2124070886a;hp=c2ead161b1b22b245380ed6978b7356c84f6b268;hpb=b56d9c55ebfc3651b8b3a0b2e43240a9054d680c;p=jSite2.git
diff --git a/src/net/pterodactylus/util/fcp/AllData.java b/src/net/pterodactylus/util/fcp/AllData.java
index c2ead16..37ffa08 100644
--- a/src/net/pterodactylus/util/fcp/AllData.java
+++ b/src/net/pterodactylus/util/fcp/AllData.java
@@ -30,7 +30,7 @@ public class AllData extends BaseMessage {
* @param payloadInputStream
* The payload
*/
- public AllData(FcpMessage receivedMessage, InputStream payloadInputStream) {
+ AllData(FcpMessage receivedMessage, InputStream payloadInputStream) {
super(receivedMessage);
this.payloadInputStream = payloadInputStream;
}
@@ -51,11 +51,7 @@ public class AllData extends BaseMessage {
* not be parsed
*/
public long getDataLength() {
- try {
- return Long.valueOf(getField("DataLength"));
- } catch (NumberFormatException nfe1) {
- return -1;
- }
+ return FcpUtils.safeParseLong(getField("DataLength"));
}
/**
@@ -65,11 +61,7 @@ public class AllData extends BaseMessage {
* 1970 UTC), or -1
if the time could not be parsed
*/
public long getStartupTime() {
- try {
- return Long.valueOf(getField("StartupTime"));
- } catch (NumberFormatException nfe1) {
- return -1;
- }
+ return FcpUtils.safeParseLong(getField("StartupTime"));
}
/**
@@ -79,11 +71,7 @@ public class AllData extends BaseMessage {
* 1970 UTC), or -1
if the time could not be parsed
*/
public long getCompletionTime() {
- try {
- return Long.valueOf(getField("CompletionTime"));
- } catch (NumberFormatException nfe1) {
- return -1;
- }
+ return FcpUtils.safeParseLong(getField("CompletionTime"));
}
/**