Scanner s = new Scanner(inputStream).useDelimiter("\\A");
String string = s.next();
s.close();
if(!Configs.CHECK_FOR_UPDATES) return;
Gson gson = new Gson();
LinkedTreeMap part = gson.fromJson(string, LinkedTreeMap.class);
Boolean hasNew = (Boolean) part.get("new");
if(hasNew) {
VersionChecker.hasNewVersion = true;
VersionChecker.newVersion = Integer.toString(Double.valueOf(part.get("build").toString()).intValue());
LogisticsPipes.log.info("New LogisticsPipes" + (LPConstants.DEV_BUILD?"-Dev":"") + " version found: #" + Double.valueOf(part.get("build").toString()).intValue());
LinkedTreeMap changeLog = (LinkedTreeMap) part.get("changelog");
List<String> changeLogList = new ArrayList<String>();
if(changeLog != null) {
for(Object oVersion:changeLog.keySet()) {
String build = oVersion.toString();
changeLogList.add(new StringBuilder(build).append(": ").toString());
List<String> sub = (List<String>) changeLog.get(build);
for(String msg:sub) {
if(msg.length() > 60) {
boolean first = true;
while(!msg.isEmpty()) {
int splitAt = msg.substring(0, Math.min(first ? 60 : 55, msg.length())).lastIndexOf(' ');