Java 8 ReadOnlyBufferException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ReadOnlyBufferException class.

This code example shows how to use the following methods:getCause, getLocalizedMessage, getMessage
     
    /** 
     *@tests {@link java.nio.ReadOnlyBufferException#ReadOnlyBufferException()} 
     */ 
    public void test_Constructor() { 
        ReadOnlyBufferException exception = new ReadOnlyBufferException();
        assertNull(exception.getMessage());
        assertNull(exception.getLocalizedMessage());
        assertNull(exception.getCause());
    } 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        return false; 
    } 
 
    @Override 
    public byte[] array() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public int arrayOffset() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public boolean hasMemoryAddress() { 
        return false; 
    } 
 
    @Override 
    public long memoryAddress() { 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        return 0; 
    } 
 
    @Override 
    public ByteBuf capacity(int newCapacity) {
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public ByteBufAllocator alloc() { 
        return alloc;
    } 
 
    @Override 
    public ByteOrder order() {
        return order;
    } 
 
    @Override 
    public ByteBuf unwrap() { 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    public boolean hasArray() { 
        return false; 
    } 
 
    public byte[] array() { 
        throw new ReadOnlyBufferException();
    } 
 
    public int arrayOffset() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public void discardReadBytes() { 
        throw new ReadOnlyBufferException();
    } 
 
    public void setByte(int index, int value) {
        throw new ReadOnlyBufferException();
    } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        return false; 
    } 
 
    @Override 
    public byte[] array() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public int arrayOffset() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public void discardReadBytes() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public void setByte(int index, int value) {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	card.checkExclusive();
	if ((command == null) || (response == null)) {
	    throw new NullPointerException();
	} 
	if (response.isReadOnly()) {
	    throw new ReadOnlyBufferException();
	} 
	if (command == response) {
	    throw new IllegalArgumentException("command and response must not be the same object");
	} 
	if (response.remaining() < 258) {
	    throw new IllegalArgumentException("Insufficient space in response buffer");
	} 
	byte[] commandBytes = new byte[command.remaining()];
	command.get(commandBytes);
	byte[] responseBytes = doTransmit(commandBytes);
	response.put(responseBytes);
	return responseBytes.length;
    } 
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        return true; 
    } 
 
    @Override 
    public HeapBuffer prepend(Buffer header) { 
        throw new ReadOnlyBufferException(); 
    } 
 
    @Override 
    public HeapBuffer put(int index, byte b) { 
        throw new ReadOnlyBufferException(); 
    } 
 
    @Override 
    public HeapBuffer put(Buffer src) { 
        throw new ReadOnlyBufferException(); 
    } 
 
    @Override 
    public HeapBuffer put(Buffer src, int position, int length) { 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    public boolean hasArray() { 
        return false; 
    } 
 
    public byte[] array() { 
        throw new ReadOnlyBufferException();
    } 
 
    public int arrayOffset() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public void discardReadBytes() { 
        throw new ReadOnlyBufferException();
    } 
 
    public void setByte(int index, int value) {
        throw new ReadOnlyBufferException();
    } 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    public boolean hasArray() { 
        return false; 
    } 
 
    public byte[] array() { 
        throw new ReadOnlyBufferException();
    } 
 
    public int arrayOffset() { 
        throw new ReadOnlyBufferException();
    } 
 
    @Override 
    public void discardReadBytes() { 
        throw new ReadOnlyBufferException();
    } 
 
    public void setByte(int index, int value) {
        throw new ReadOnlyBufferException();
    } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 ReadOnlyBufferException Methods: