throw new NullPointerException("storeable is null");
}
+ // Debug message
+ this.getLogger().debug("this.entrySet().size()=" + this.entrySet().size());
+
+ // No matches found?
+ if (this.entrySet().isEmpty()) {
+ // Debug message
+ this.getLogger().debug("No criteria set, returning true ...");
+
+ // Then there is nothing to match!
+ return true;
+ }
+
// Init matches array
Map<String, Boolean> criteraMatches = new HashMap<>(this.entrySet().size());
}
/**
- * Writes data BASE64-encoded to database file
+ * Writes a line with BASE64 encoding to database file
*
* @param output Output string to write
*/
// Trace message
this.getLogger().trace("output=" + output + " - CALLED!");
+ // No null or empty strings
+ if (output == null) {
+ // Is null
+ throw new NullPointerException("output is null");
+ } else if (output.length() == 0) {
+ // Is empty
+ throw new IllegalArgumentException("output is empty");
+ }
+
// Encode it to BASE64
String rawOutput = Base64.encodeBase64String(output.toString().getBytes());
// Debug message
this.getLogger().debug("rawOutput=" + rawOutput);
- // Write it
- this.getStorageFile().writeBytes(rawOutput);
+ // Write each line separately
+ this.getStorageFile().writeBytes(rawOutput + "\n");
// Trace message
this.getLogger().trace("EXIT!");