endianness -> defaultEndianness

This commit is contained in:
Trustin Lee 2008-12-08 09:50:00 +00:00
parent 95d3b145e2
commit 6e08f03589

View File

@ -52,13 +52,13 @@ public class DirectChannelBufferFactory extends AbstractChannelBufferFactory {
return INSTANCE_BE; return INSTANCE_BE;
} }
public static ChannelBufferFactory getInstance(ByteOrder endianness) { public static ChannelBufferFactory getInstance(ByteOrder defaultEndianness) {
if (endianness == ByteOrder.BIG_ENDIAN) { if (defaultEndianness == ByteOrder.BIG_ENDIAN) {
return INSTANCE_BE; return INSTANCE_BE;
} else if (endianness == ByteOrder.LITTLE_ENDIAN) { } else if (defaultEndianness == ByteOrder.LITTLE_ENDIAN) {
return INSTANCE_LE; return INSTANCE_LE;
} else if (endianness == null) { } else if (defaultEndianness == null) {
throw new NullPointerException("endianness"); throw new NullPointerException("defaultEndianness");
} else { } else {
throw new IllegalStateException("Should not reach here"); throw new IllegalStateException("Should not reach here");
} }