Package java.nio

Examples of java.nio.BufferOverflowException


  @Override
  public void put( byte b ) throws BufferOverflowException
  {
    if (nextPut >= size)
      throw new BufferOverflowException();
    buffer[nextPut++] = b;
  }
View Full Code Here


  @Override
  public void put( byte b ) throws BufferOverflowException
  {
    if (isFull())
      throw new BufferOverflowException();
   
    length++;
    buf[nextPut++] = b;
    if (nextPut >= size)
      nextPut = 0;
View Full Code Here

        int oldLimit = limit();
        int end = position() + fieldSize;

        if (oldLimit < end) {
            throw new BufferOverflowException();
        }

        if (val.length() == 0) {
            if (!utf16) {
                put((byte) 0x00);
View Full Code Here

                {
                    return null;
                }
                else
                {
                    throw new BufferOverflowException();
                }
            }
            final ByteBuffer buffer = allocator.allocate( payload.length );

            if ( buffer == null )
View Full Code Here

                {
                    return null;
                }
                else
                {
                    throw new BufferOverflowException();
                }
            }

            final ByteBuffer buffer = allocator.allocate( size );
View Full Code Here

        int oldLimit = limit();
        int end = position() + fieldSize;

        if( oldLimit < end )
        {
            throw new BufferOverflowException();
        }

        if( val.length() == 0 )
        {
            if( !utf16 )
View Full Code Here

  @Override
  public void put( byte b ) throws BufferOverflowException
  {
    if (nextPut >= size)
      throw new BufferOverflowException();
    buffer[nextPut++] = b;
  }
View Full Code Here

  @Override
  public void put( byte b ) throws BufferOverflowException
  {
    if (isFull())
      throw new BufferOverflowException();
   
    length++;
    buf[nextPut++] = b;
    if (nextPut >= size)
      nextPut = 0;
View Full Code Here

      maxChunks = chunksPerPkt;
    }

    void writeData(byte[] inarray, int off, int len) {
      if ( dataPos + len > buf.length) {
        throw new BufferOverflowException();
      }
      System.arraycopy(inarray, off, buf, dataPos, len);
      dataPos += len;
    }
View Full Code Here

      dataPos += len;
    }

    void  writeChecksum(byte[] inarray, int off, int len) {
      if (checksumPos + len > dataStart) {
        throw new BufferOverflowException();
      }
      System.arraycopy(inarray, off, buf, checksumPos, len);
      checksumPos += len;
    }
View Full Code Here

TOP

Related Classes of java.nio.BufferOverflowException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.