Class Value.StringValue

    • Constructor Detail

      • StringValue

        public StringValue​(java.lang.String v)
      • StringValue

        public StringValue​(byte[] v)
    • Method Detail

      • valid

        public boolean valid()
        Description copied from interface: Inspector
        Check if the inspector is valid. If you try to access a field or array entry that does not exist, you will get an invalid Inspector returned.
        Specified by:
        valid in interface Inspector
        Overrides:
        valid in class Value
      • type

        public Type type()
        Description copied from interface: Inspector
        Get the type of an inspector
        Specified by:
        type in interface Inspector
        Overrides:
        type in class Value
      • asString

        public java.lang.String asString()
        Description copied from interface: Inspector
        Access the inspector's value if it's a STRING; otherwise throws exception
        Specified by:
        asString in interface Inspector
        Overrides:
        asString in class Value
      • asString

        public java.lang.String asString​(java.lang.String x)
        Description copied from interface: Inspector
        Get the inspector's value (or the supplied default), never throws
        Specified by:
        asString in interface Inspector
        Overrides:
        asString in class Value
      • asUtf8

        public byte[] asUtf8()
        Description copied from interface: Inspector
        Access the inspector's value (in utf-8 representation) if it's a STRING; otherwise throws exception
        Specified by:
        asUtf8 in interface Inspector
        Overrides:
        asUtf8 in class Value
      • asUtf8

        public byte[] asUtf8​(byte[] x)
        Description copied from interface: Inspector
        Get the inspector's value (or the supplied default), never throws
        Specified by:
        asUtf8 in interface Inspector
        Overrides:
        asUtf8 in class Value