Index: /luni/src/main/java/java/io/BufferedReader.java
===================================================================
--- /luni/src/main/java/java/io/BufferedReader.java (revision 396144)
+++ /luni/src/main/java/java/io/BufferedReader.java (working copy)
@@ -32,6 +32,7 @@
* will buffer input for the file file.java.
*
* @see BufferedWriter
+ * @since 1.1
*/
public class BufferedReader extends Reader {
@@ -113,7 +114,7 @@
return result;
}
if (markpos == 0 && marklimit > buf.length) {
- /* Increase buffer size to accomodate the readlimit */
+ /* Increase buffer size to accommodate the readlimit */
int newLength = buf.length * 2;
if (newLength > marklimit)
newLength = marklimit;
@@ -151,7 +152,7 @@
*
* @param readlimit
* an int representing how many characters must be read
- * beforeinvalidating the mark.
+ * before invalidating the mark.
*
* @throws IOException
* If an error occurs attempting mark this BufferedReader.
@@ -310,7 +311,7 @@
synchronized (lock) {
if (isOpen()) {
char eol = '\0';
- StringBuffer result = new StringBuffer(80);
+ StringBuilder result = new StringBuilder(80);
/* Typical Line Length */
while (true) {
@@ -381,7 +382,7 @@
* this new location. If this Reader was not marked, throw IOException.
*
* @throws IOException
- * If a problem occured, the receiver does not support
+ * If a problem occurred, the receiver does not support
* mark()/reset(), or no mark has been set.
*/
Index: /luni/src/main/java/java/io/File.java
===================================================================
--- /luni/src/main/java/java/io/File.java (revision 396144)
+++ /luni/src/main/java/java/io/File.java (working copy)
@@ -1099,7 +1099,7 @@
int newInt = new java.util.Random().nextInt();
counter = ((newInt / 65535) & 0xFFFF) + 0x2710;
}
- StringBuffer newName = new StringBuffer();
+ StringBuilder newName = new StringBuilder();
newName.append(prefix);
newName.append(counter++);
newName.append(suffix);
@@ -1200,7 +1200,7 @@
if (!name.startsWith("/")) // On Windows, absolute paths might not //$NON-NLS-1$
// start with sep.
return new URI("file", null, //$NON-NLS-1$
- new StringBuffer(name.length() + 1).append('/').append(
+ new StringBuilder(name.length() + 1).append('/').append(
name).toString(), null, null);
else if (name.startsWith("//")) //$NON-NLS-1$
return new URI("file", name, null); // UNC path //$NON-NLS-1$
@@ -1225,7 +1225,7 @@
String name = getAbsoluteName();
if (!name.startsWith("/")) // On Windows, absolute paths might not //$NON-NLS-1$
// start with sep.
- return new URL("file", "", -1, new StringBuffer(name.length() + 1) //$NON-NLS-1$ //$NON-NLS-2$
+ return new URL("file", "", -1, new StringBuilder(name.length() + 1) //$NON-NLS-1$ //$NON-NLS-2$
.append('/').append(name).toString(), null);
else if (name.startsWith("//")) //$NON-NLS-1$
return new URL("file:" + name); // UNC path //$NON-NLS-1$
@@ -1240,7 +1240,7 @@
// with
// a
// slash
- name = new StringBuffer(name.length() + 1).append(name).append('/')
+ name = new StringBuilder(name.length() + 1).append(name).append('/')
.toString();
if (separatorChar != '/') // Must convert slashes.
name = name.replace(separatorChar, '/');
Index: /luni/src/main/java/java/io/FilePermission.java
===================================================================
--- /luni/src/main/java/java/io/FilePermission.java (revision 396144)
+++ /luni/src/main/java/java/io/FilePermission.java (working copy)
@@ -125,7 +125,7 @@
int highestBitMask = 1 << (len - 1);
// if a bit of mask is set, append the corresponding action to result
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
boolean addedItem = false;
for (int i = 0; i < len; i++) {
if ((highestBitMask & mask) != 0) {
Index: /luni/src/main/java/java/io/LineNumberReader.java
===================================================================
--- /luni/src/main/java/java/io/LineNumberReader.java (revision 396144)
+++ /luni/src/main/java/java/io/LineNumberReader.java (working copy)
@@ -185,7 +185,7 @@
public String readLine() throws IOException {
synchronized (lock) {
/* Typical Line Length */
- StringBuffer result = new StringBuffer(80);
+ StringBuilder result = new StringBuilder(80);
while (true) {
int character = read();
if (character == -1)
Index: /luni/src/main/java/java/io/RandomAccessFile.java
===================================================================
--- /luni/src/main/java/java/io/RandomAccessFile.java (revision 396144)
+++ /luni/src/main/java/java/io/RandomAccessFile.java (working copy)
@@ -475,7 +475,7 @@
* error occurs.
*/
public final String readLine() throws IOException {
- StringBuffer line = new StringBuffer(80); // Typical line length
+ StringBuilder line = new StringBuilder(80); // Typical line length
boolean foundTerminator = false;
long unreadPosition = 0;
while (true) {
Index: /luni/src/main/java/java/io/StreamTokenizer.java
===================================================================
--- /luni/src/main/java/java/io/StreamTokenizer.java (revision 396144)
+++ /luni/src/main/java/java/io/StreamTokenizer.java (working copy)
@@ -301,7 +301,7 @@
* contained within words.
*/
if ((currentType & TOKEN_DIGIT) != 0) {
- StringBuffer digits = new StringBuffer(20);
+ StringBuilder digits = new StringBuilder(20);
boolean haveDecimal = false, checkJustNegative = currentChar == '-';
while (true) {
if (currentChar == '.')
@@ -567,7 +567,7 @@
*/
public String toString() {
// Values determined through experimentation
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
result.append("Token["); //$NON-NLS-1$
switch (ttype) {
case TT_EOF: