mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-10 22:13:37 +00:00
add exception handling
This commit is contained in:
parent
46f44c4421
commit
a196831f1a
@ -154,6 +154,11 @@ public class Util {
|
|||||||
|
|
||||||
public static String getText(byte[] buffer, int offset, int length){
|
public static String getText(byte[] buffer, int offset, int length){
|
||||||
byte [] byteData = getBytes(buffer, offset, length);
|
byte [] byteData = getBytes(buffer, offset, length);
|
||||||
return new String(byteData, "UTF-8");
|
try {
|
||||||
|
return new String(byteData, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user