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 e7244ba118
commit 0c2ba89c55

View File

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