Class BinaryContext

    • Field Detail

      • DEFAULT_FORMAT

        private static final java.text.Format DEFAULT_FORMAT
    • Constructor Detail

      • BinaryContext

        public BinaryContext()
      • BinaryContext

        private BinaryContext​(java.text.Format format)
    • Method Detail

      • enforce

        public byte[] enforce​(byte[] object)
        Description copied from interface: TypeContext
        Will force the object to conform to the context's specification. The default implementation formats a String and then parses that back to an object (of the original type).
      • configureFormat

        protected void configureFormat​(java.text.Format format,
                                       java.lang.Object object)
        Specified by:
        configureFormat in class FormatContext<byte[]>
      • handleFormatException

        protected java.lang.String handleFormatException​(java.text.Format format,
                                                         java.lang.Object object)
        Specified by:
        handleFormatException in class FormatContext<byte[]>
      • handleParseException

        protected byte[] handleParseException​(java.text.Format format,
                                              java.lang.String string)
        Specified by:
        handleParseException in class FormatContext<byte[]>