File tree 1 file changed +13
-0
lines changed
utilcode/src/main/java/com/blankj/utilcode/util
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,12 @@ public static CharSequence htmlDecode(final String input) {
184
184
}
185
185
}
186
186
187
+ /**
188
+ * Return the binary encoded string padded with one space
189
+ *
190
+ * @param input
191
+ * @return binary string
192
+ */
187
193
public static String binEncode (final String input ) {
188
194
StringBuilder stringBuilder = new StringBuilder ();
189
195
for (char i : input .toCharArray ()) {
@@ -192,6 +198,13 @@ public static String binEncode(final String input) {
192
198
}
193
199
return stringBuilder .toString ();
194
200
}
201
+
202
+ /**
203
+ * Return UTF-8 String from binary
204
+ *
205
+ * @param input binary string
206
+ * @return UTF-8 String
207
+ */
195
208
public static String binDecode (final String input ){
196
209
String [] splitted = input .split (" " );
197
210
StringBuilder sb = new StringBuilder ();
You can’t perform that action at this time.
0 commit comments