fix a few interfaces

This commit is contained in:
Naoyuki Kanezawa
2014-07-13 15:48:53 +09:00
parent f4177196eb
commit f823857662
2 changed files with 6 additions and 3 deletions

View File

@@ -189,8 +189,10 @@ public class Socket extends Emitter {
/** /**
* Connects the client. * Connects the client.
*
* @return a reference to to this object.
*/ */
public void open() { public Socket open() {
EventThread.exec(new Runnable() { EventThread.exec(new Runnable() {
@Override @Override
public void run() { public void run() {
@@ -206,6 +208,7 @@ public class Socket extends Emitter {
transport.open(); transport.open();
} }
}); });
return this;
} }
private Transport createTransport(String name) { private Transport createTransport(String name) {

View File

@@ -246,7 +246,7 @@ public class Parser {
} }
} }
public static String byteArrayToString(byte[] bytes) { private static String byteArrayToString(byte[] bytes) {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for (byte b : bytes) { for (byte b : bytes) {
builder.appendCodePoint(b & 0xFF); builder.appendCodePoint(b & 0xFF);
@@ -254,7 +254,7 @@ public class Parser {
return builder.toString(); return builder.toString();
} }
public static byte[] stringToByteArray(String string) { private static byte[] stringToByteArray(String string) {
int len = string.length(); int len = string.length();
byte[] bytes = new byte[len]; byte[] bytes = new byte[len];
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {