Remember and expose the start time of a connection.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / Metadata.java
index 52cb365..0903457 100644 (file)
@@ -59,6 +59,24 @@ public class Metadata {
        //
 
        /**
+        * Returns the embedded format metadata.
+        *
+        * @return The format metadata
+        */
+       public FormatMetadata format() {
+               return formatMetadata;
+       }
+
+       /**
+        * Returns the embedded content metadata.
+        *
+        * @return The content metadata
+        */
+       public ContentMetadata content() {
+               return contentMetadata;
+       }
+
+       /**
         * Returns the number of channels of this metadata.
         *
         * @return The number of channels of this metadata
@@ -204,7 +222,7 @@ public class Metadata {
 
        @Override
        public String toString() {
-               return String.format("%s: %s", formatMetadata, contentMetadata);
+               return String.format("%s%s%s", formatMetadata, contentMetadata.toString().length() > 0 ? ": " : "", contentMetadata);
        }
 
 }