Java ByteBuffer Read checkNotReadOnly(ByteBuffer buffer)

Here you can find the source of checkNotReadOnly(ByteBuffer buffer)

Description

check Not Read Only

License

Open Source License

Declaration

public static void checkNotReadOnly(ByteBuffer buffer) 

Method Source Code


//package com.java2s;
/* Partial import of https://github.com/jpountz/lz4-java, Apache 2.0 licensed. */

import java.nio.ByteBuffer;

import java.nio.ReadOnlyBufferException;

public class Main {
    public static void checkNotReadOnly(ByteBuffer buffer) {
        if (buffer.isReadOnly()) {
            throw new ReadOnlyBufferException();
        }//from  w  w  w.  j  av  a 2s  . c  o m
    }
}

Related

  1. assertReadyForFreshRead(ByteBuffer b)
  2. c_read(Channel fd, ByteBuffer buffer, int count)
  3. contentOfUnreadBuffer(final ByteBuffer buffer)
  4. enlargeThreadLocalByteBuffer()
  5. parseEsInfo(ByteBuffer read)
  6. read(@Nonnull final FileChannel src, @Nonnull final ByteBuffer dst, @Nonnegative final long position)