Package Wattos.Utils

Examples of Wattos.Utils.StringArrayList


        /**
         * For the long command string it's real nice to have the overview layed out in a printf way
         */
        Parameters p = new Parameters(); // Printf parameters autoclearing after use.
        Set<String> keySet = parameterMap.keySet();
        StringArrayList sal = new StringArrayList(keySet);
        sal.sort();
        int n = sal.size();
        for (int i = 0; i < n; i++) {
            String key = sal.getString(i);
            p.add(key);
            p.add(parameterMap.get(key));
            String item = Format.sprintf("%-30s = %-30s\n", p);
            result.append(item);
        }
View Full Code Here


        long cingrunLogFileSize = cingRunLogFile.length();
        General.showDebug("cingrunLogFileSize: " + cingrunLogFileSize);
        long cingrunLogFileSizeLast = 0;
        if (lastLogSendFile.exists()) {
            General.showDebug("Checking lastLogSendFile: " + lastLogSendFile);
            StringArrayList sal = new StringArrayList();
            boolean statusRead = sal.read(lastLogSendFile.toString());
            lastLogSendFile.delete();
            if (!statusRead) {
                writeJsonError(response, result, "Failed to read the lastLogSendFile: " + lastLogSendFile);
                return;
            }
            if (sal.size() < 1) {
                writeJsonError(response, result, "Failed to read at least one line from the present lastLogSendFile: "
                        + lastLogSendFile);
                return;
            }
            String cingrunLogFileSizeLastStr = sal.getString(0);
            General.showDebug("cingrunLogFileSizeLast (string): " + cingrunLogFileSizeLastStr);
            cingrunLogFileSizeLast = Long.parseLong(cingrunLogFileSizeLastStr);

            General.showDebug("cingrunLogFileSizeLast (long): " + cingrunLogFileSizeLast);
        } else {
            General.showDebug("no LAST_LOG_SEND_FILE: " + Settings.LAST_LOG_SEND_FILE);
        }

        // # doesn't exist because it was just removed if it even existed to start with.
        StringArrayList sal = new StringArrayList();
        sal.add(Long.toString(cingrunLogFileSize));
        General.showDebug("writing to LAST_LOG_SEND_FILE: " + Settings.LAST_LOG_SEND_FILE);
        if (!sal.write(lastLogSendFile.toString())) {
            writeJsonError(response, result, "Failed to write to new lastLogSendFile: " + lastLogSendFile);
            return;
        }

        if (cingrunLogFileSize > cingrunLogFileSizeLast) {
View Full Code Here

TOP

Related Classes of Wattos.Utils.StringArrayList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.