Examples of charAt()


Examples of java.nio.CharBuffer.charAt()

      ByteBuffer byFrom = getChannel().map(FileChannel.MapMode.READ_ONLY, position, 256);
      CharBuffer chFrom = decoder.decode(byFrom);

      int start = 0;
      // Ignore any white spaces and line feed
      char c = chFrom.charAt(start);
      while (c==' ' || c=='\r' || c=='\n' || c=='\t') c = chFrom.charAt(++start);
      // If first line does not start with message preffx then raise an exception
      if (!chFrom.subSequence(start, start+FROM__PREFIX.length()).toString().equals(FROM__PREFIX))
        throw new IOException ("MboxFile.getMessageAsStream() starting position " + String.valueOf(start) + " \""+chFrom.subSequence(start, start+FROM__PREFIX.length()).toString()+"\" does not match a begin message token \"" + FROM__PREFIX + "\"");
      // Skip the From line
View Full Code Here

Examples of java.nio.CharBuffer.charAt()

      CharBuffer chFrom = decoder.decode(byFrom);

      int start = 0;
      // Ignore any white spaces and line feed
      char c = chFrom.charAt(start);
      while (c==' ' || c=='\r' || c=='\n' || c=='\t') c = chFrom.charAt(++start);
      // If first line does not start with message preffx then raise an exception
      if (!chFrom.subSequence(start, start+FROM__PREFIX.length()).toString().equals(FROM__PREFIX))
        throw new IOException ("MboxFile.getMessageAsStream() starting position " + String.valueOf(start) + " \""+chFrom.subSequence(start, start+FROM__PREFIX.length()).toString()+"\" does not match a begin message token \"" + FROM__PREFIX + "\"");
      // Skip the From line
      while (chFrom.charAt(start++)!=(char) 10) ;
View Full Code Here

Examples of java.nio.CharBuffer.charAt()

      while (c==' ' || c=='\r' || c=='\n' || c=='\t') c = chFrom.charAt(++start);
      // If first line does not start with message preffx then raise an exception
      if (!chFrom.subSequence(start, start+FROM__PREFIX.length()).toString().equals(FROM__PREFIX))
        throw new IOException ("MboxFile.getMessageAsStream() starting position " + String.valueOf(start) + " \""+chFrom.subSequence(start, start+FROM__PREFIX.length()).toString()+"\" does not match a begin message token \"" + FROM__PREFIX + "\"");
      // Skip the From line
      while (chFrom.charAt(start++)!=(char) 10) ;

      log.debug("  skip = " + String.valueOf(start));
      log.debug("  start = " + String.valueOf(position+start));

      MappedByteBuffer byBuffer = getChannel().map(FileChannel.MapMode.READ_ONLY, position+start, size-start);
View Full Code Here

Examples of java.sql.Timestamp.charAt()

        } else if (Short.class.equals(valueType)) {
            Short aux = rs.getShort(columnName);
            result = (rs.wasNull()) ? null : (T) aux;
        } else if (char.class.equals(valueType) || Character.class.equals(valueType)) {
            String aux = rs.getString(columnName);
            result = (aux != null) ? (T) new Character(aux.charAt(0)) : null;
        } else {           
            result = (T) rs.getObject(columnName);
        }
       
        return result;
View Full Code Here

Examples of javax.lang.model.element.Name.charAt()

  static String propertyNameOfMethod(Element el) {
    Name methodName = el.getSimpleName();
    String propertyName = null;
    if (methodName.length() > 3 && "get".contentEquals(methodName.subSequence(0, 3))) {
      StringBuilder sb = new StringBuilder(methodName.length() - 3);
      sb.append(Character.toLowerCase(methodName.charAt(3)));
      sb.append(methodName.subSequence(4, methodName.length()));
      propertyName = sb.toString();
    }
    else if (methodName.length() > 2 && "is".contentEquals(methodName.subSequence(0, 2))) {
      StringBuilder sb = new StringBuilder(methodName.length() - 2);
View Full Code Here

Examples of javolution.text.CharArray.charAt()

            if (value == null)
                return defaultValue;
            if (value.length() != 1)
                throw new XMLStreamException(
                        "Single character expected (read '" + value + "')");
            return value.charAt(0);
        }

        /**
         * Returns the specified <code>byte</code> attribute. This method handles
         * string formats that are used to represent octal and hexadecimal numbers.
View Full Code Here

Examples of net.sf.saxon.om.FastStringBuffer.charAt()

                throw new NumberFormatException("no digits in value");
            }

            // remove insignificant trailing zeroes
            while (scale > 0) {
                if (digits.charAt(digits.length()-1) == '0') {
                    digits.setLength(digits.length() - 1);
                    scale--;
                } else {
                    break;
                }
View Full Code Here

Examples of org.apache.beehive.netui.util.internal.InternalStringBuilder.charAt()

            {
                appendToResult( result, item.getValue() );
            }
        }

        if ( result.length() > 0 && result.charAt( result.length() - 1 ) == '?' )
        {
            result.deleteCharAt( result.length() - 1 );
        }

        return result.toString();
View Full Code Here

Examples of org.apache.commons.lang.text.StrBuilder.charAt()

            {
                /*
                 *  now the convenience, flip the 1st character
                 */

                char c = sb.charAt(3);

                if (Character.isLowerCase(c))
                {
                    sb.setCharAt(3, Character.toUpperCase(c));
                }
View Full Code Here

Examples of org.apache.flink.types.StringValue.charAt()

      Assert.assertEquals(string3.compareTo(string3n), 0);
      Assert.assertEquals(string3.toString(), string3n.toString());
      Assert.assertEquals(string7.compareTo(string7n), 0);
      Assert.assertEquals(string7.toString(), string7n.toString());
      try {
        string7n.charAt(5);
        Assert.fail("Exception should have been thrown when accessing characters out of bounds.");
      } catch (IndexOutOfBoundsException iOOBE) {}
     
    } catch (Exception e) {
      Assert.assertTrue(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.