use BigInteger to calculate the recording size

This commit is contained in:
Felipe Cecagno 2015-12-09 23:42:22 -02:00
parent ee357aa7ac
commit 1dc6a675e4

View File

@ -19,6 +19,7 @@
package org.bigbluebutton.api.domain;
import java.math.BigInteger;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -94,14 +95,14 @@ public class Recording {
}
public String getSize() {
int size = 0;
BigInteger size = BigInteger.ZERO;
for (Playback p: playbacks) {
size += Integer.parseInt(p.getSize());
size = size.add(new BigInteger(p.getSize()));
}
for (Download p: downloads) {
size += Integer.parseInt(p.getSize());
size = size.add(new BigInteger(p.getSize()));
}
return String.valueOf(size);
return size.toString();
}
public String getRawSize() {