Package java.nio

Examples of java.nio.BufferOverflowException


      MalformedInputException, CharacterCodingException {
    switch (this.type) {
    case TYPE_UNDERFLOW:
      throw new BufferUnderflowException();
    case TYPE_OVERFLOW:
      throw new BufferOverflowException();
    case TYPE_UNMAPPABLE_CHAR:
      throw new UnmappableCharacterException(this.length);
    case TYPE_MALFORMED_INPUT:
      throw new MalformedInputException(this.length);
    default:
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

        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

        dataPos = dataStart;
      }

      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

        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

    protected final int putIndex(int len) {
        checkReleased();
        checkReadonly();
        if (limit - position < len)
            throw new BufferOverflowException();
        int p = position + offset;
        position += len;
        return p;
    }
View Full Code Here

            resize();
            spaceLeft = spaceLeft();
          }

          if(!blockingWrite && spaceLeft < len)
            throw new BufferOverflowException();

          int realLen = Math.min(len, spaceLeft);
          int firstLen = Math.min(realLen, buffer.length - writePosition);
          int secondLen = Math.min(realLen - firstLen, buffer.length - markPosition - 1);
          int written = firstLen + secondLen;
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.