Package sun.io

Examples of sun.io.ConversionBufferFullException


                  if (by == '\\') {
                      state = StateBackslash;
                      continue;
                  }
                  if (charOff >= cend) {
                      throw new ConversionBufferFullException();
                  }
                  chars[charOff++] = (char)by;
                  count++;
                  continue;
              }
              case StateBackslash: {
                  if (by == 'u') {
                      state = StateU;
                      continue;
                  }
                  if (charOff+1 >= cend) {
                      throw new ConversionBufferFullException();
                  }
                  chars[charOff++] = '\\';
                  chars[charOff++] = (char)by;
                  count+=2;
                  state = StateNormal;
                  break;
              }
              case StateU: {
                  int digit = Character.digit((char)by, 16);
                  if (digit == -1) {
                      throw new MalformedInputException();
                  }
                  escapedChar = (char)(digit << 12);
                  state = StateFirst;
                  break;
              }
              case StateFirst: {
                  int digit = Character.digit((char)by, 16);
                  if (digit == -1) {
                      throw new MalformedInputException();
                  }
                  escapedChar |= digit << 8;
                  state = StateSecond;
                  break;
              }
              case StateSecond: {
                  int digit = Character.digit((char)by, 16);
                  if (digit == -1) {
                      throw new MalformedInputException();
                  }
                  escapedChar |= digit << 4;
                  state = StateThird;
                  break;
              }
              case StateThird: {
                  int digit = Character.digit((char)by, 16);
                  if (digit == -1) {
                      throw new MalformedInputException();
                  }
                  escapedChar |= digit << 0;

                  if (charOff >= cend) {
                      throw new ConversionBufferFullException();
                  }
                  chars[charOff++] = escapedChar;
                  count++;

                  state = StateNormal;
View Full Code Here

TOP

Related Classes of sun.io.ConversionBufferFullException

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.