[libbluray-devel] org.dvb.io.persistent: add toString()

hpi1 git at videolan.org
Wed Apr 13 11:34:38 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Apr 13 12:21:16 2016 +0300| [8e244909d52cf833c5ec7f4136cd3361de9da676] | committer: hpi1

org.dvb.io.persistent: add toString()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=8e244909d52cf833c5ec7f4136cd3361de9da676
---

 .../dvb/io/persistent/FileAccessPermissions.java   |   34 +++++++++++++-------
 .../java/org/dvb/io/persistent/FileAttributes.java |    5 +++
 2 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/src/libbluray/bdj/java/org/dvb/io/persistent/FileAccessPermissions.java b/src/libbluray/bdj/java/org/dvb/io/persistent/FileAccessPermissions.java
index 35a2c17..6458b5e 100644
--- a/src/libbluray/bdj/java/org/dvb/io/persistent/FileAccessPermissions.java
+++ b/src/libbluray/bdj/java/org/dvb/io/persistent/FileAccessPermissions.java
@@ -21,12 +21,12 @@ package org.dvb.io.persistent;
 
 public class FileAccessPermissions {
     public FileAccessPermissions(boolean readWorld, boolean writeWorld,
-            boolean readOrganisation, boolean writeOrganisation,
+            boolean readOrganization, boolean writeOrganization,
             boolean readApplication, boolean writeApplication) {
         this.readWorld = readWorld;
         this.writeWorld = writeWorld;
-        this.readOrganisation = readOrganisation;
-        this.writeOrganisation = writeOrganisation;
+        this.readOrganization = readOrganization;
+        this.writeOrganization = writeOrganization;
         this.readApplication = readApplication;
         this.writeApplication = writeApplication;
     }
@@ -39,12 +39,12 @@ public class FileAccessPermissions {
         return writeWorld;
     }
 
-    public boolean hasReadOrganisationAccessRight() {
-        return readOrganisation;
+    public boolean hasReadOrganizationAccessRight() {
+        return readOrganization;
     }
 
-    public boolean hasWriteOrganisationAccessRight() {
-        return writeOrganisation;
+    public boolean hasWriteOrganizationAccessRight() {
+        return writeOrganization;
     }
 
     public boolean hasReadApplicationAccessRight() {
@@ -56,20 +56,30 @@ public class FileAccessPermissions {
     }
 
     public void setPermissions(boolean ReadWorld, boolean WriteWorld,
-            boolean ReadOrganisation, boolean WriteOrganisation,
+            boolean ReadOrganization, boolean WriteOrganization,
             boolean ReadApplication, boolean WriteApplication) {
         this.readWorld = ReadWorld;
         this.writeWorld = WriteWorld;
-        this.readOrganisation = ReadOrganisation;
-        this.writeOrganisation = WriteOrganisation;
+        this.readOrganization = ReadOrganization;
+        this.writeOrganization = WriteOrganization;
         this.readApplication = ReadApplication;
         this.writeApplication = WriteApplication;
     }
 
+    public String toString() {
+        return this.getClass().getName() +
+            "[rApp=" + readApplication +
+            ",wApp=" + writeApplication +
+            ",rOrg=" + readOrganization +
+            ",wOrg=" + writeOrganization +
+            ",rWorld=" + readWorld +
+            ",wWorld=" + writeWorld + "]";
+    }
+
     private boolean readWorld;
     private boolean writeWorld;
-    private boolean readOrganisation;
-    private boolean writeOrganisation;
+    private boolean readOrganization;
+    private boolean writeOrganization;
     private boolean readApplication;
     private boolean writeApplication;
 }
diff --git a/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java b/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java
index a94f891..e733a97 100644
--- a/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java
+++ b/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java
@@ -75,6 +75,11 @@ public class FileAttributes {
         return new FileAttributes(null, permissions, PRIORITY_LOW);
     }
 
+    public String toString() {
+        return this.getClass().getName() + "[priority=" + priority + ",permissions=" +
+            permissions + ",expirationDate=" + expirationDate + "]";
+    }
+
     private FileAccessPermissions permissions;
     private int priority;
     private Date expirationDate;



More information about the libbluray-devel mailing list