@Deprecated
    public static ByteBuf unmodifiableBuffer(ByteBuf buffer) {
        ByteOrder endianness = buffer.order();
        if (endianness == BIG_ENDIAN) {
            return new ReadOnlyByteBuf(buffer);
        }

        return new ReadOnlyByteBuf(buffer.order(BIG_ENDIAN)).order(LITTLE_ENDIAN);
    }
@ Deprecated public static ByteBuf unmodifiableBuffer ( ByteBuf buffer ) { ByteOrder endianness = buffer . order ( ) ; if ( endianness == BIG_ENDIAN ) { return new ReadOnlyByteBuf ( buffer ) ; } return new ReadOnlyByteBuf ( buffer . order ( BIG_ENDIAN ) ) . order ( LITTLE_ENDIAN ) ; }
Creates a read-only buffer which disallows any modification operations
on the specified {@code buffer}.  The new buffer has the same
{@code readerIndex} and {@code writerIndex} with the specified
{@code buffer}.

@deprecated Use {@link ByteBuf#asReadOnly()}.