Example usage for java.nio ReadOnlyBufferException ReadOnlyBufferException

List of usage examples for java.nio ReadOnlyBufferException ReadOnlyBufferException

Introduction

In this page you can find the example usage for java.nio ReadOnlyBufferException ReadOnlyBufferException.

Prototype

public ReadOnlyBufferException() 

Source Link

Document

Constructs a ReadOnlyBufferException .

Usage

From source file:com.slytechs.utils.region.FlexRegion.java

private final void throwIfNoAppend() {
    if (this.append) {
        return;/*from  w  ww.j  a  va  2s .com*/
    }

    throw new ReadOnlyBufferException();
}

From source file:com.slytechs.utils.region.FlexRegion.java

private final void throwIfReadonly() {
    if (this.readonly == false) {
        return;/*  ww  w .j a  v a 2s .  c  o m*/
    }

    throw new ReadOnlyBufferException();
}