Experimental change to use less memory for sockets - may break player NPCs

This commit is contained in:
fullwall 2012-08-05 14:21:34 +08:00
parent 90e5b4b2d9
commit 52e393b44b

View File

@ -10,11 +10,13 @@ public class EmptySocket extends Socket {
@Override
public InputStream getInputStream() {
return new ByteArrayInputStream(new byte[10]);
return new ByteArrayInputStream(EMPTY);
}
@Override
public OutputStream getOutputStream() {
return new ByteArrayOutputStream();
return new ByteArrayOutputStream(1);
}
private static final byte[] EMPTY = new byte[0];
}