Examples of charAt()


Examples of java.lang.CharSequence.charAt()

                return obj.hashCode();
            CharSequence chars = (CharSequence) obj;
            int h = 0;
            final int length = chars.length();
            for (int i = 0; i < length;) {
                h = 31 * h + chars.charAt(i++);
            }
            return h;
        }

        public boolean areEqual(Object o1, Object o2) {
View Full Code Here

Examples of java.lang.String.charAt()

        String ldapDN = "";
        for (int i=0; i<RDNs.size(); i++)
            ldapDN =  get(i) + (i!=0?",":"") + ldapDN;
        if (ldapDN.endsWith(","))
        {
            if (ldapDN.charAt(ldapDN.length()-2) != '\\')
            {
                ldapDN = ldapDN.substring(0,ldapDN.length()-1);
            }
        }
        return ldapDN;
View Full Code Here

Examples of java.lang.StringBuffer.charAt()

            "");
    StringBuffer sbControl = new StringBuffer();
    for (int ic = 0x80; ic <= 0x9f; ic++) {
      sbControl.append((char)ic);
    }
    super.append("control(0)=\n" + sbControl.charAt(0) + "," + Integer.toHexString(sbControl.charAt(0)));
    String control = sbControl.toString();
    char[] cc = new char[sbControl.length()];
    sbControl.getChars(0, cc.length, cc, 0);
    String control2 = new String(cc);
    super.append("control(0)=\n" + control.charAt(0) + "," + Integer.toHexString(control.charAt(0)));
View Full Code Here

Examples of java.lang.StringBuffer.charAt()

            "");
    StringBuffer sbControl = new StringBuffer();
    for (int ic = 0x80; ic <= 0x9f; ic++) {
      sbControl.append((char)ic);
    }
    super.append("control(0)=\n" + sbControl.charAt(0) + "," + Integer.toHexString(sbControl.charAt(0)));
    String control = sbControl.toString();
    char[] cc = new char[sbControl.length()];
    sbControl.getChars(0, cc.length, cc, 0);
    String control2 = new String(cc);
    super.append("control(0)=\n" + control.charAt(0) + "," + Integer.toHexString(control.charAt(0)));
View Full Code Here

Examples of java.nio.CharBuffer.charAt()

      ByteBuffer byFrom = getChannel().map(FileChannel.MapMode.READ_ONLY, begin, 128);
      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(begin+start));

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

Examples of java.nio.CharBuffer.charAt()

      log.debug("from line decoded");

      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
      log.debug("first line is " + chFrom.subSequence(start, start+FROM__PREFIX.length()).toString());
      if (!chFrom.subSequence(start, start+FROM__PREFIX.length()).toString().equals(FROM__PREFIX))
        throw new IOException ("MboxFile.getPartAsStream() starting position " + String.valueOf(start) + " \""+chFrom.subSequence(start, start+FROM__PREFIX.length()).toString()+"\" does not match a begin message token \"" + FROM__PREFIX + "\"");
View Full Code Here

Examples of java.nio.CharBuffer.charAt()

      log.debug("from line decoded");

      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
      log.debug("first line is " + chFrom.subSequence(start, start+FROM__PREFIX.length()).toString());
      if (!chFrom.subSequence(start, start+FROM__PREFIX.length()).toString().equals(FROM__PREFIX))
        throw new IOException ("MboxFile.getPartAsStream() 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()

      // If first line does not start with message preffx then raise an exception
      log.debug("first line is " + chFrom.subSequence(start, start+FROM__PREFIX.length()).toString());
      if (!chFrom.subSequence(start, start+FROM__PREFIX.length()).toString().equals(FROM__PREFIX))
        throw new IOException ("MboxFile.getPartAsStream() 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) ;

      start += offset;

      log.debug("  skip = " + String.valueOf(start));
      log.debug("  start = " + String.valueOf(start));
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.