亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stringbuffer.java

?? kaffe Java 解釋器語言,源碼,Java的子集系統,開放源代碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* StringBuffer.java -- Growable strings   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version. */package java.lang;import java.io.Serializable;/** * <code>StringBuffer</code> represents a changeable <code>String</code>. * It provides the operations required to modify the * <code>StringBuffer</code>, including insert, replace, delete, append, * and reverse. It is thread-safe; meaning that all modifications to a buffer * are in synchronized methods. * * <p><code>StringBuffer</code>s are variable-length in nature, so even if * you initialize them to a certain size, they can still grow larger than * that. <em>Capacity</em> indicates the number of characters the * <code>StringBuffer</code> can have in it before it has to grow (growing * the char array is an expensive operation involving <code>new</code>). * * <p>Incidentally, compilers often implement the String operator "+" * by using a <code>StringBuffer</code> operation:<br> * <code>a + b</code><br> * is the same as<br> * <code>new StringBuffer().append(a).append(b).toString()</code>. * * <p>Classpath's StringBuffer is capable of sharing memory with Strings for * efficiency.  This will help when a StringBuffer is converted to a String * and the StringBuffer is not changed after that (quite common when performing * string concatenation). * * @author Paul Fisher * @author John Keiser * @author Tom Tromey * @author Eric Blake <ebb9@email.byu.edu> * @see String * @since 1.0 * @status updated to 1.4 */public final class StringBuffer implements Serializable, CharSequence{  /**   * Compatible with JDK 1.0+.   */  private static final long serialVersionUID = 3388685877147921107L;  /**   * Index of next available character (and thus the size of the current   * string contents).  Note that this has permissions set this way so that   * String can get the value.   *   * @serial the number of characters in the buffer   */  int count;  /**   * The buffer.  Note that this has permissions set this way so that String   * can get the value.   *   * @serial the buffer   */  char[] value;  /**   * True if the buffer is shared with another object (StringBuffer or   * String); this means the buffer must be copied before writing to it again.   * Note that this has permissions set this way so that String can get the   * value.   *   * @serial whether the buffer is shared   */  boolean shared;  /**   * The default capacity of a buffer.   */  private final static int DEFAULT_CAPACITY = 16;  /**   * Create a new StringBuffer with default capacity 16.   */  public StringBuffer()  {    this(DEFAULT_CAPACITY);  }  /**   * Create an empty <code>StringBuffer</code> with the specified initial   * capacity.   *   * @param capacity the initial capacity   * @throws NegativeArraySizeException if capacity is negative   */  public StringBuffer(int capacity)  {    value = new char[capacity];  }  /**   * Create a new <code>StringBuffer</code> with the characters in the   * specified <code>String</code>. Initial capacity will be the size of the   * String plus 16.   *   * @param str the <code>String</code> to convert   * @throws NullPointerException if str is null   */  public StringBuffer(String str)  {    // Unfortunately, because the size is 16 larger, we cannot share.    count = str.count;    value = new char[count + DEFAULT_CAPACITY];    str.getChars(0, count, value, 0);  }  /**   * Get the length of the <code>String</code> this <code>StringBuffer</code>   * would create. Not to be confused with the <em>capacity</em> of the   * <code>StringBuffer</code>.   *   * @return the length of this <code>StringBuffer</code>   * @see #capacity()   * @see #setLength(int)   */  public synchronized int length()  {    return count;  }  /**   * Get the total number of characters this <code>StringBuffer</code> can   * support before it must be grown.  Not to be confused with <em>length</em>.   *   * @return the capacity of this <code>StringBuffer</code>   * @see #length()   * @see #ensureCapacity(int)   */  public synchronized int capacity()  {    return value.length;  }  /**   * Increase the capacity of this <code>StringBuffer</code>. This will   * ensure that an expensive growing operation will not occur until   * <code>minimumCapacity</code> is reached. The buffer is grown to the   * larger of <code>minimumCapacity</code> and   * <code>capacity() * 2 + 2</code>, if it is not already large enough.   *   * @param minimumCapacity the new capacity   * @see #capacity()   */  public synchronized void ensureCapacity(int minimumCapacity)  {    ensureCapacity_unsynchronized(minimumCapacity);  }  /**   * Set the length of this StringBuffer. If the new length is greater than   * the current length, all the new characters are set to '\0'. If the new   * length is less than the current length, the first <code>newLength</code>   * characters of the old array will be preserved, and the remaining   * characters are truncated.   *   * @param newLength the new length   * @throws IndexOutOfBoundsException if the new length is negative   *         (while unspecified, this is a StringIndexOutOfBoundsException)   * @see #length()   */  public synchronized void setLength(int newLength)  {    if (newLength < 0)      throw new StringIndexOutOfBoundsException(newLength);    ensureCapacity_unsynchronized(newLength);    while (count < newLength)      value[count++] = '\0';    count = newLength;  }  /**   * Get the character at the specified index.   *   * @param index the index of the character to get, starting at 0   * @return the character at the specified index   * @throws IndexOutOfBoundsException if index is negative or &gt;= length()   *         (while unspecified, this is a StringIndexOutOfBoundsException)   */  public synchronized char charAt(int index)  {    if (index < 0 || index >= count)      throw new StringIndexOutOfBoundsException(index);    return value[index];  }  /**   * Get the specified array of characters. <code>srcOffset - srcEnd</code>   * characters will be copied into the array you pass in.   *   * @param srcOffset the index to start copying from (inclusive)   * @param srcEnd the index to stop copying from (exclusive)   * @param dst the array to copy into   * @param dstOffset the index to start copying into   * @throws NullPointerException if dst is null   * @throws IndexOutOfBoundsException if any source or target indices are   *         out of range (while unspecified, source problems cause a   *         StringIndexOutOfBoundsException, and dest problems cause an   *         ArrayIndexOutOfBoundsException)   * @see System#arraycopy(Object, int, Object, int, int)   */  public synchronized void getChars(int srcOffset, int srcEnd,                                    char[] dst, int dstOffset)  {    if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset)      throw new StringIndexOutOfBoundsException();    System.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset);  }  /**   * Set the character at the specified index.   *   * @param index the index of the character to set starting at 0   * @param ch the value to set that character to   * @throws IndexOutOfBoundsException if index is negative or &gt;= length()   *         (while unspecified, this is a StringIndexOutOfBoundsException)   */  public synchronized void setCharAt(int index, char ch)  {    if (index < 0 || index >= count)      throw new StringIndexOutOfBoundsException(index);    // Call ensureCapacity to enforce copy-on-write.    ensureCapacity_unsynchronized(count);    value[index] = ch;  }  /**   * Append the <code>String</code> value of the argument to this   * <code>StringBuffer</code>. Uses <code>String.valueOf()</code> to convert   * to <code>String</code>.   *   * @param obj the <code>Object</code> to convert and append   * @return this <code>StringBuffer</code>   * @see String#valueOf(Object)   * @see #append(String)   */  public StringBuffer append(Object obj)  {    return append(obj == null ? "null" : obj.toString());  }  /**   * Append the <code>String</code> to this <code>StringBuffer</code>. If   * str is null, the String "null" is appended.   *   * @param str the <code>String</code> to append   * @return this <code>StringBuffer</code>   */  public synchronized StringBuffer append(String str)  {    if (str == null)      str = "null";    int len = str.count;    ensureCapacity_unsynchronized(count + len);    str.getChars(0, len, value, count);    count += len;    return this;  }  /**   * Append the <code>StringBuffer</code> value of the argument to this   * <code>StringBuffer</code>. This behaves the same as   * <code>append((Object) stringBuffer)</code>, except it is more efficient.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片一区二区| 欧美在线你懂的| 日本高清无吗v一区| 久久综合视频网| 五月天国产精品| 91麻豆swag| 国产精品丝袜在线| 久久精品国产99久久6| 欧美日韩激情在线| 亚洲欧美日韩精品久久久久| 国产一二精品视频| 欧美一级欧美三级在线观看| 一区二区三区欧美久久| 国产成人免费视频一区| 日韩欧美另类在线| 天天影视涩香欲综合网| 欧美午夜一区二区三区| 中文字幕一区不卡| 成人免费高清在线| 久久久精品黄色| 国产一区二区三区av电影| 日韩三级电影网址| 天堂成人国产精品一区| 精品视频999| 亚洲国产另类av| 欧美日韩一区二区在线观看| 亚洲激情自拍视频| 99热精品国产| 亚洲精选免费视频| 色婷婷激情一区二区三区| 亚洲另类春色国产| 色婷婷精品久久二区二区蜜臀av| 最新日韩av在线| 成人的网站免费观看| 欧美国产成人在线| 99re6这里只有精品视频在线观看| 国产女人18水真多18精品一级做| 国产精品亚洲专一区二区三区 | 欧美丰满一区二区免费视频| 1024成人网色www| 91香蕉视频在线| 亚洲一区二区欧美日韩| 欧美怡红院视频| 日韩成人一级片| 精品国产一区二区三区av性色 | 日韩欧美一卡二卡| 国产一区欧美一区| 国产精品久久久久久久久免费丝袜| 国产很黄免费观看久久| 自拍偷拍亚洲欧美日韩| 欧美午夜精品一区二区蜜桃| 日本伊人午夜精品| 久久精品亚洲麻豆av一区二区| 国产盗摄视频一区二区三区| 亚洲欧洲精品一区二区精品久久久| 91在线观看污| 天天色天天操综合| 国产亚洲一区二区三区四区| 99久久99久久综合| 日韩精品一级中文字幕精品视频免费观看 | 激情六月婷婷综合| 国产精品视频一二三区| 91国在线观看| 开心九九激情九九欧美日韩精美视频电影| 精品国产乱码久久久久久牛牛| 成人免费的视频| 国产精品中文欧美| 亚洲免费av在线| 91精品国产福利| 95精品视频在线| 精品国产百合女同互慰| 欧美日韩五月天| 欧美三级中文字| 免费观看一级特黄欧美大片| 欧美经典一区二区| 欧美视频一区在线观看| 高潮精品一区videoshd| 亚洲va国产天堂va久久en| 欧美高清在线精品一区| 91精品国模一区二区三区| 99久久精品国产导航| 久久精品国产澳门| 亚洲高清视频在线| 欧美国产精品劲爆| 精品国产一区二区三区久久久蜜月 | 国产精品一二三区| 亚洲成人手机在线| 亚洲天堂2014| 国产欧美一区二区精品性色超碰 | 亚洲一二三四区| 国产精品视频线看| 日韩欧美国产综合| 久久久久9999亚洲精品| 欧美日韩电影在线| 欧美性色综合网| 91免费精品国自产拍在线不卡 | 精品国产乱码久久久久久浪潮| 色噜噜久久综合| 91亚洲午夜精品久久久久久| 国产麻豆视频一区二区| 老司机免费视频一区二区| 亚洲国产aⅴ天堂久久| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 精品三级av在线| 欧美一区二区三区免费视频| 欧美色网一区二区| 色噜噜狠狠成人中文综合| 91亚洲资源网| 一道本成人在线| 色婷婷综合五月| 色综合久久88色综合天天| 92国产精品观看| 色婷婷精品大视频在线蜜桃视频| 成人激情图片网| 国产.欧美.日韩| 成人性生交大片免费看视频在线 | 18成人在线观看| 亚洲欧美综合网| 亚洲精品视频自拍| 一区二区三区小说| 亚洲一区在线观看视频| 五月激情丁香一区二区三区| 午夜视频一区二区| 日本午夜一本久久久综合| 琪琪久久久久日韩精品| 看电影不卡的网站| 国产福利一区二区| 91在线观看高清| 欧美日韩一级片网站| 欧美一二三区精品| 久久蜜桃av一区精品变态类天堂| 国产午夜精品一区二区三区嫩草 | 日本韩国精品在线| 在线播放视频一区| 久久久.com| 亚洲色图清纯唯美| 香蕉av福利精品导航| 狠狠色丁香久久婷婷综合丁香| 东方aⅴ免费观看久久av| 色呦呦一区二区三区| 3d成人h动漫网站入口| 久久亚洲影视婷婷| 成人欧美一区二区三区视频网页| 亚洲福利视频一区| 国产一区二区三区不卡在线观看| 91在线视频免费91| 欧美一级二级三级乱码| 中文一区一区三区高中清不卡| 亚洲一区二区三区四区在线免费观看| 日韩黄色一级片| 懂色av一区二区三区蜜臀| 欧美大片一区二区| 成人欧美一区二区三区黑人麻豆| 三级欧美韩日大片在线看| 国产成人免费高清| 7777精品伊人久久久大香线蕉最新版| 久久综合色8888| 亚洲成人av一区二区| 国产激情一区二区三区| 在线观看91精品国产麻豆| 中文字幕欧美一| 国产中文字幕一区| 欧美乱妇15p| 综合久久久久综合| 国产一区二区三区四区五区美女| 欧洲精品在线观看| 国产日韩精品一区二区浪潮av| 亚洲h在线观看| 91论坛在线播放| 国产欧美一区在线| 精品夜夜嗨av一区二区三区| 欧美三级在线看| 中文字幕在线播放不卡一区| 国内久久精品视频| 7777精品伊人久久久大香线蕉经典版下载 | 天天操天天综合网| 色综合天天综合狠狠| 国产欧美日本一区二区三区| 蜜臀a∨国产成人精品| 在线观看日韩国产| 中文字幕在线一区免费| 国产精品一区一区| 日韩欧美一区二区视频| 午夜成人在线视频| 欧美怡红院视频| 亚洲啪啪综合av一区二区三区| 国产成人免费高清| 久久精品亚洲一区二区三区浴池| 免费看日韩a级影片| 91精品啪在线观看国产60岁| 亚洲综合区在线| 在线观看日韩国产| 一区二区高清视频在线观看| 91成人免费在线视频| 一区二区三区四区乱视频| 91视频免费观看| 亚洲免费色视频| 欧美性做爰猛烈叫床潮| 亚洲综合在线视频| 欧美撒尿777hd撒尿|