summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2012-02-27 22:43:30 -0800
committerJames Dong <jdong@google.com>2012-02-27 22:46:02 -0800
commitf7a68fc98550859019bb0636fc3e8d88cb50e6a6 (patch)
treeb37eed8d007d0be23b87bc49300cd42faa07ec65 /drm
parentfd400f5f483d76a38a28155a7328a953ed3ec36f (diff)
downloadframeworks_base-f7a68fc98550859019bb0636fc3e8d88cb50e6a6.zip
frameworks_base-f7a68fc98550859019bb0636fc3e8d88cb50e6a6.tar.gz
frameworks_base-f7a68fc98550859019bb0636fc3e8d88cb50e6a6.tar.bz2
Added missing javadoc comment for public API in DrmUtils class
o also fixed mis-spelled private method name (quiteDispose => quietlyDispose) Change-Id: I692cd7471eac547b849dd53853f60843b3915750
Diffstat (limited to 'drm')
-rwxr-xr-xdrm/java/android/drm/DrmUtils.java30
1 files changed, 25 insertions, 5 deletions
diff --git a/drm/java/android/drm/DrmUtils.java b/drm/java/android/drm/DrmUtils.java
index dc5f1fa..4f7cb22 100755
--- a/drm/java/android/drm/DrmUtils.java
+++ b/drm/java/android/drm/DrmUtils.java
@@ -55,8 +55,8 @@ public class DrmUtils {
bufferedStream.read(data);
}
} finally {
- quiteDispose(bufferedStream);
- quiteDispose(inputStream);
+ quietlyDispose(bufferedStream);
+ quietlyDispose(inputStream);
}
return data;
}
@@ -70,7 +70,7 @@ public class DrmUtils {
outputStream = new FileOutputStream(path);
outputStream.write(data);
} finally {
- quiteDispose(outputStream);
+ quietlyDispose(outputStream);
}
}
}
@@ -80,7 +80,7 @@ public class DrmUtils {
file.delete();
}
- private static void quiteDispose(InputStream stream) {
+ private static void quietlyDispose(InputStream stream) {
try {
if (null != stream) {
stream.close();
@@ -90,7 +90,7 @@ public class DrmUtils {
}
}
- private static void quiteDispose(OutputStream stream) {
+ private static void quietlyDispose(OutputStream stream) {
try {
if (null != stream) {
stream.close();
@@ -175,14 +175,34 @@ public class DrmUtils {
}
}
+ /**
+ * This method returns an iterator object that can be used to iterate over
+ * all values of the metadata.
+ *
+ * @return The iterator object.
+ */
public Iterator<String> iterator() {
return mMap.values().iterator();
}
+ /**
+ * This method returns an iterator object that can be used to iterate over
+ * all keys of the metadata.
+ *
+ * @return The iterator object.
+ */
public Iterator<String> keyIterator() {
return mMap.keySet().iterator();
}
+ /**
+ * This method retrieves the metadata value associated with a given key.
+ *
+ * @param key The key whose value is being retrieved.
+ *
+ * @return The metadata value associated with the given key. Returns null
+ * if the key is not found.
+ */
public String get(String key) {
return mMap.get(key);
}