Skip to content

Commit d53d469

Browse files
committed
Added java doc
1 parent 8afdedf commit d53d469

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

utilcode/src/main/java/com/blankj/utilcode/util/EncodeUtils.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ public static CharSequence htmlDecode(final String input) {
184184
}
185185
}
186186

187+
/**
188+
* Return the binary encoded string padded with one space
189+
*
190+
* @param input
191+
* @return binary string
192+
*/
187193
public static String binEncode(final String input) {
188194
StringBuilder stringBuilder = new StringBuilder();
189195
for (char i : input.toCharArray()) {
@@ -192,6 +198,13 @@ public static String binEncode(final String input) {
192198
}
193199
return stringBuilder.toString();
194200
}
201+
202+
/**
203+
* Return UTF-8 String from binary
204+
*
205+
* @param input binary string
206+
* @return UTF-8 String
207+
*/
195208
public static String binDecode(final String input){
196209
String[] splitted = input.split(" ");
197210
StringBuilder sb = new StringBuilder();

0 commit comments

Comments
 (0)