@@ -543,7 +543,7 @@ public static Bytes from(UUID uuid) {
543543 * @param binaryString the encoded string
544544 * @return decoded instance
545545 */
546- public static Bytes parseBinary (String binaryString ) {
546+ public static Bytes parseBinary (CharSequence binaryString ) {
547547 return parseRadix (binaryString , 2 );
548548 }
549549
@@ -553,7 +553,7 @@ public static Bytes parseBinary(String binaryString) {
553553 * @param octalString the encoded string
554554 * @return decoded instance
555555 */
556- public static Bytes parseOctal (String octalString ) {
556+ public static Bytes parseOctal (CharSequence octalString ) {
557557 return parseRadix (octalString , 8 );
558558 }
559559
@@ -563,7 +563,7 @@ public static Bytes parseOctal(String octalString) {
563563 * @param decString the encoded string
564564 * @return decoded instance
565565 */
566- public static Bytes parseDec (String decString ) {
566+ public static Bytes parseDec (CharSequence decString ) {
567567 return parseRadix (decString , 10 );
568568 }
569569
@@ -578,7 +578,7 @@ public static Bytes parseDec(String decString) {
578578 * @param radix radix of the String representation (supported are 2-36)
579579 * @return decoded instance
580580 */
581- public static Bytes parseRadix (String radixNumberString , int radix ) {
581+ public static Bytes parseRadix (CharSequence radixNumberString , int radix ) {
582582 return parse (radixNumberString , new BinaryToTextEncoding .BaseRadixNumber (radix ));
583583 }
584584
@@ -589,7 +589,7 @@ public static Bytes parseRadix(String radixNumberString, int radix) {
589589 * @param hexString the encoded string
590590 * @return decoded instance
591591 */
592- public static Bytes parseHex (String hexString ) {
592+ public static Bytes parseHex (CharSequence hexString ) {
593593 return parse (hexString , new BinaryToTextEncoding .Hex ());
594594 }
595595
@@ -601,7 +601,7 @@ public static Bytes parseHex(String hexString) {
601601 * @param base32Rfc4648String the encoded string
602602 * @return decoded instance
603603 */
604- public static Bytes parseBase32 (String base32Rfc4648String ) {
604+ public static Bytes parseBase32 (CharSequence base32Rfc4648String ) {
605605 return parse (base32Rfc4648String , new BaseEncoding (BaseEncoding .BASE32_RFC4848 , BaseEncoding .BASE32_RFC4848_PADDING ));
606606 }
607607
@@ -613,10 +613,10 @@ public static Bytes parseBase32(String base32Rfc4648String) {
613613 *
614614 * @param base36String the encoded string
615615 * @return decoded instance
616- * @deprecated use {@link #parseRadix(String , int)} with 36 instead; will be removed in v1.0+
616+ * @deprecated use {@link #parseRadix(CharSequence , int)} with 36 instead; will be removed in v1.0+
617617 */
618618 @ Deprecated
619- public static Bytes parseBase36 (String base36String ) {
619+ public static Bytes parseBase36 (CharSequence base36String ) {
620620 return parse (base36String , new BinaryToTextEncoding .BaseRadixNumber (36 ));
621621 }
622622
@@ -626,7 +626,7 @@ public static Bytes parseBase36(String base36String) {
626626 * @param base64String the encoded string
627627 * @return decoded instance
628628 */
629- public static Bytes parseBase64 (String base64String ) {
629+ public static Bytes parseBase64 (CharSequence base64String ) {
630630 return parse (base64String , new BinaryToTextEncoding .Base64Encoding ());
631631 }
632632
@@ -637,7 +637,7 @@ public static Bytes parseBase64(String base64String) {
637637 * @param decoder the decoder used to decode the string
638638 * @return decoded instance
639639 */
640- public static Bytes parse (String encoded , BinaryToTextEncoding .Decoder decoder ) {
640+ public static Bytes parse (CharSequence encoded , BinaryToTextEncoding .Decoder decoder ) {
641641 return wrap (Objects .requireNonNull (decoder , "passed decoder instance must no be null" ).decode (Objects .requireNonNull (encoded , "encoded data must not be null" )));
642642 }
643643
0 commit comments