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;
}
public static ChannelBufferFactory getInstance(ByteOrder endianness) {
if (endianness == ByteOrder.BIG_ENDIAN) {
public static ChannelBufferFactory getInstance(ByteOrder defaultEndianness) {
if (defaultEndianness == ByteOrder.BIG_ENDIAN) {
return INSTANCE_BE;
} else if (endianness == ByteOrder.LITTLE_ENDIAN) {
} else if (defaultEndianness == ByteOrder.LITTLE_ENDIAN) {
return INSTANCE_LE;
} else if (endianness == null) {
throw new NullPointerException("endianness");
} else if (defaultEndianness == null) {
throw new NullPointerException("defaultEndianness");
} else {
throw new IllegalStateException("Should not reach here");
}