Commit d6ddb1fa authored by Julien Cervelle's avatar Julien Cervelle
Browse files

-

parent fa9a065b
Pipeline #2720 failed with stage
in 1 minute and 44 seconds
......@@ -125,13 +125,17 @@ public class Channel<T> {
os.write(serializeToString(s));
os.close();
uc.connect();
//byte[] result = uc.getInputStream().readAllBytes();
// result should be ['O','K','\n']
byte[] result = uc.getInputStream().readAllBytes();
// result should be ['O','K'] = [79, 75]
if (!java.util.Arrays.equals(result,OK)) {
throw new IOException("Unexpected answer from server");
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private static final byte[] OK = {'O','K'};
static class Test implements Serializable{
......@@ -164,8 +168,8 @@ public class Channel<T> {
}
public static void main(String[] args) throws ClassNotFoundException, IOException {
//testObject();
testString();
testObject();
//testString();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment