changeset 1330:5f64da4d382c

Document constraints on saveFile Reviewed-by: jerboaa Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-November/008777.html
author Omair Majid <omajid@redhat.com>
date Fri, 15 Nov 2013 11:14:29 -0500
parents 73167580250d
children f0eb836ff306
files storage/core/src/main/java/com/redhat/thermostat/storage/core/Storage.java
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/storage/core/src/main/java/com/redhat/thermostat/storage/core/Storage.java	Thu Nov 14 13:17:20 2013 -0500
+++ b/storage/core/src/main/java/com/redhat/thermostat/storage/core/Storage.java	Fri Nov 15 11:14:29 2013 -0500
@@ -96,6 +96,13 @@
     /**
      * Save the contents of the input stream as the given name.
      *
+     * @param filename
+     *            the name to save this data stream as. This must be unique
+     *            across all machines and processes using the storage or it will
+     *            overwrite data.
+     * @param data
+     *            the data to save
+     *
      * @throws StorageException
      *            If the save operation fails
      */
@@ -104,6 +111,8 @@
     /**
      * Load the file with the given name and return the data as an InputStream.
      *
+     * @return the data as an {@link InputStream} or {@code null} if not found.
+     *
      * @throws StorageException
      *            If the load operation fails
      */