endianness -> defaultEndianness
This commit is contained in:
parent
95d3b145e2
commit
6e08f03589
@ -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");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user