Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
86c8c165
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
86c8c165
编写于
11月 02, 2010
作者:
R
rupashka
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6432566: Replace usage of StringBuffer with StringBuilder in Swing
Reviewed-by: malenkov
上级
ea742e00
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
36 addition
and
102 deletion
+36
-102
src/share/classes/javax/swing/DebugGraphics.java
src/share/classes/javax/swing/DebugGraphics.java
+2
-4
src/share/classes/javax/swing/text/DefaultCaret.java
src/share/classes/javax/swing/text/DefaultCaret.java
+2
-4
src/share/classes/javax/swing/text/DefaultStyledDocument.java
...share/classes/javax/swing/text/DefaultStyledDocument.java
+2
-2
src/share/classes/javax/swing/text/InternationalFormatter.java
...hare/classes/javax/swing/text/InternationalFormatter.java
+0
-2
src/share/classes/javax/swing/text/JTextComponent.java
src/share/classes/javax/swing/text/JTextComponent.java
+5
-8
src/share/classes/javax/swing/text/MaskFormatter.java
src/share/classes/javax/swing/text/MaskFormatter.java
+10
-11
src/share/classes/javax/swing/text/NumberFormatter.java
src/share/classes/javax/swing/text/NumberFormatter.java
+1
-31
src/share/classes/javax/swing/text/PlainDocument.java
src/share/classes/javax/swing/text/PlainDocument.java
+1
-4
src/share/classes/javax/swing/text/TabSet.java
src/share/classes/javax/swing/text/TabSet.java
+1
-1
src/share/classes/javax/swing/text/html/FormView.java
src/share/classes/javax/swing/text/html/FormView.java
+6
-29
src/share/classes/javax/swing/text/html/MinimalHTMLWriter.java
...hare/classes/javax/swing/text/html/MinimalHTMLWriter.java
+2
-2
src/share/classes/javax/swing/text/html/StyleSheet.java
src/share/classes/javax/swing/text/html/StyleSheet.java
+1
-1
src/share/classes/javax/swing/text/html/parser/Parser.java
src/share/classes/javax/swing/text/html/parser/Parser.java
+1
-1
src/share/classes/javax/swing/text/rtf/AbstractFilter.java
src/share/classes/javax/swing/text/rtf/AbstractFilter.java
+2
-2
未找到文件。
src/share/classes/javax/swing/DebugGraphics.java
浏览文件 @
86c8c165
...
...
@@ -1322,13 +1322,11 @@ public class DebugGraphics extends Graphics {
}
String
toShortString
()
{
StringBuffer
buffer
=
new
StringBuffer
(
"Graphics"
+
(
isDrawingBuffer
()
?
"<B>"
:
""
)
+
"("
+
graphicsID
+
"-"
+
debugOptions
+
")"
);
return
buffer
.
toString
();
return
"Graphics"
+
(
isDrawingBuffer
()
?
"<B>"
:
""
)
+
"("
+
graphicsID
+
"-"
+
debugOptions
+
")"
;
}
String
pointToString
(
int
x
,
int
y
)
{
StringBuffer
buffer
=
new
StringBuffer
(
"("
+
x
+
", "
+
y
+
")"
);
return
buffer
.
toString
();
return
"("
+
x
+
", "
+
y
+
")"
;
}
/** Enables/disables diagnostic information about every graphics
...
...
src/share/classes/javax/swing/text/DefaultCaret.java
浏览文件 @
86c8c165
...
...
@@ -1334,13 +1334,13 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou
&&
component
.
getClientProperty
(
"JPasswordField.cutCopyAllowed"
)
!=
Boolean
.
TRUE
)
{
//fix for 4793761
StringBu
ff
er
txt
=
null
;
StringBu
ild
er
txt
=
null
;
char
echoChar
=
((
JPasswordField
)
component
).
getEchoChar
();
int
p0
=
Math
.
min
(
getDot
(),
getMark
());
int
p1
=
Math
.
max
(
getDot
(),
getMark
());
for
(
int
i
=
p0
;
i
<
p1
;
i
++)
{
if
(
txt
==
null
)
{
txt
=
new
StringBu
ff
er
();
txt
=
new
StringBu
ild
er
();
}
txt
.
append
(
echoChar
);
}
...
...
@@ -1675,7 +1675,6 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou
}
return
;
}
int
adjust
=
0
;
int
offset
=
e
.
getOffset
();
int
length
=
e
.
getLength
();
int
newDot
=
dot
;
...
...
@@ -1759,7 +1758,6 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou
}
int
offs0
=
e
.
getOffset
();
int
offs1
=
offs0
+
e
.
getLength
();
int
adjust
=
0
;
int
newDot
=
dot
;
boolean
adjustDotBias
=
false
;
int
newMark
=
mark
;
...
...
src/share/classes/javax/swing/text/DefaultStyledDocument.java
浏览文件 @
86c8c165
...
...
@@ -132,7 +132,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc
// install the content
Content
c
=
getContent
();
int
n
=
data
.
length
;
StringBu
ffer
sb
=
new
StringBuff
er
();
StringBu
ilder
sb
=
new
StringBuild
er
();
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
ElementSpec
es
=
data
[
i
];
if
(
es
.
getLength
()
>
0
)
{
...
...
@@ -191,7 +191,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc
// install the content
Content
c
=
getContent
();
int
n
=
data
.
length
;
StringBu
ffer
sb
=
new
StringBuff
er
();
StringBu
ilder
sb
=
new
StringBuild
er
();
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
ElementSpec
es
=
data
[
i
];
if
(
es
.
getLength
()
>
0
)
{
...
...
src/share/classes/javax/swing/text/InternationalFormatter.java
浏览文件 @
86c8c165
...
...
@@ -30,7 +30,6 @@ import java.text.*;
import
java.text.AttributedCharacterIterator.Attribute
;
import
java.util.*
;
import
javax.swing.*
;
import
javax.swing.text.*
;
/**
* <code>InternationalFormatter</code> extends <code>DefaultFormatter</code>,
...
...
@@ -875,7 +874,6 @@ public class InternationalFormatter extends DefaultFormatter {
(
f
instanceof
AttributedCharacterIterator
.
Attribute
))
{
AttributedCharacterIterator
.
Attribute
field
=
(
AttributedCharacterIterator
.
Attribute
)
f
;
int
index
=
0
;
iterator
.
first
();
while
(
iterator
.
getIndex
()
<
start
)
{
...
...
src/share/classes/javax/swing/text/JTextComponent.java
浏览文件 @
86c8c165
...
...
@@ -35,10 +35,7 @@ import java.util.HashMap;
import
java.util.Hashtable
;
import
java.util.Enumeration
;
import
java.util.Vector
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
java.util.concurrent.*
;
...
...
@@ -4058,7 +4055,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
private
static
final
Object
KEYMAP_TABLE
=
new
StringBuilder
(
"JTextComponent_KeymapTable"
);
private
JTextComponent
editor
;
//
// member variables used for on-the-spot input method
// editing style support
...
...
@@ -4748,14 +4745,14 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
processKeyEvent
(
ke
);
}
}
else
{
StringBu
ffer
strBuf
=
new
StringBuff
er
();
StringBu
ilder
strBuf
=
new
StringBuild
er
();
for
(
char
c
=
text
.
current
();
commitCount
>
0
;
c
=
text
.
next
(),
commitCount
--)
{
strBuf
.
append
(
c
);
}
// map it to an ActionEvent
mapCommittedTextToAction
(
new
String
(
strBuf
));
mapCommittedTextToAction
(
strBuf
.
toString
(
));
}
// Remember latest committed text end index
...
...
@@ -4801,7 +4798,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
private
void
createComposedTextAttribute
(
int
composedIndex
,
AttributedCharacterIterator
text
)
{
Document
doc
=
getDocument
();
StringBu
ffer
strBuf
=
new
StringBuff
er
();
StringBu
ilder
strBuf
=
new
StringBuild
er
();
// create attributed string with no attributes
for
(
char
c
=
text
.
setIndex
(
composedIndex
);
...
...
@@ -4809,7 +4806,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
strBuf
.
append
(
c
);
}
composedTextContent
=
new
String
(
strBuf
);
composedTextContent
=
strBuf
.
toString
(
);
composedTextAttribute
=
new
SimpleAttributeSet
();
composedTextAttribute
.
addAttribute
(
StyleConstants
.
ComposedTextAttribute
,
new
AttributedString
(
text
,
composedIndex
,
text
.
getEndIndex
()));
...
...
src/share/classes/javax/swing/text/MaskFormatter.java
浏览文件 @
86c8c165
...
...
@@ -29,7 +29,6 @@ import java.io.*;
import
java.text.*
;
import
java.util.*
;
import
javax.swing.*
;
import
javax.swing.text.*
;
/**
* <code>MaskFormatter</code> is used to format and edit strings. The behavior
...
...
@@ -385,7 +384,7 @@ public class MaskFormatter extends DefaultFormatter {
*/
public
String
valueToString
(
Object
value
)
throws
ParseException
{
String
sValue
=
(
value
==
null
)
?
""
:
value
.
toString
();
StringBu
ffer
result
=
new
StringBuff
er
();
StringBu
ilder
result
=
new
StringBuild
er
();
String
placeholder
=
getPlaceholder
();
int
[]
valueCounter
=
{
0
};
...
...
@@ -484,7 +483,7 @@ public class MaskFormatter extends DefaultFormatter {
* Invokes <code>append</code> on the mask characters in
* <code>mask</code>.
*/
private
void
append
(
StringBu
ff
er
result
,
String
value
,
int
[]
index
,
private
void
append
(
StringBu
ild
er
result
,
String
value
,
int
[]
index
,
String
placeholder
,
MaskCharacter
[]
mask
)
throws
ParseException
{
for
(
int
counter
=
0
,
maxCounter
=
mask
.
length
;
...
...
@@ -611,13 +610,13 @@ public class MaskFormatter extends DefaultFormatter {
* Removes the literal characters from the passed in string.
*/
private
String
stripLiteralChars
(
String
string
)
{
StringBu
ff
er
sb
=
null
;
StringBu
ild
er
sb
=
null
;
int
last
=
0
;
for
(
int
counter
=
0
,
max
=
string
.
length
();
counter
<
max
;
counter
++){
if
(
isLiteral
(
counter
))
{
if
(
sb
==
null
)
{
sb
=
new
StringBu
ff
er
();
sb
=
new
StringBu
ild
er
();
if
(
counter
>
0
)
{
sb
.
append
(
string
.
substring
(
0
,
counter
));
}
...
...
@@ -715,10 +714,10 @@ public class MaskFormatter extends DefaultFormatter {
*/
boolean
canReplace
(
ReplaceHolder
rh
)
{
// This method is rather long, but much of the burden is in
// maintaining a String and swapping to a StringBu
ff
er only if
// maintaining a String and swapping to a StringBu
ild
er only if
// absolutely necessary.
if
(!
getAllowsInvalid
())
{
StringBu
ff
er
replace
=
null
;
StringBu
ild
er
replace
=
null
;
String
text
=
rh
.
text
;
int
tl
=
(
text
!=
null
)
?
text
.
length
()
:
0
;
...
...
@@ -737,7 +736,7 @@ public class MaskFormatter extends DefaultFormatter {
char
aChar
=
text
.
charAt
(
textIndex
);
if
(
aChar
!=
getCharacter
(
rh
.
offset
+
counter
,
aChar
))
{
if
(
replace
==
null
)
{
replace
=
new
StringBu
ff
er
();
replace
=
new
StringBu
ild
er
();
if
(
textIndex
>
0
)
{
replace
.
append
(
text
.
substring
(
0
,
textIndex
));
}
...
...
@@ -758,7 +757,7 @@ public class MaskFormatter extends DefaultFormatter {
}
}
else
if
(
textIndex
>
0
)
{
replace
=
new
StringBu
ff
er
(
max
);
replace
=
new
StringBu
ild
er
(
max
);
replace
.
append
(
text
.
substring
(
0
,
textIndex
));
replace
.
append
(
getLiteral
(
rh
.
offset
+
counter
));
if
(
textIndex
<
tl
)
{
...
...
@@ -780,7 +779,7 @@ public class MaskFormatter extends DefaultFormatter {
else
if
(
textIndex
>=
tl
)
{
// placeholder
if
(
replace
==
null
)
{
replace
=
new
StringBu
ff
er
();
replace
=
new
StringBu
ild
er
();
if
(
text
!=
null
)
{
replace
.
append
(
text
);
}
...
...
@@ -863,7 +862,7 @@ public class MaskFormatter extends DefaultFormatter {
* Appends the necessary character in <code>formatting</code> at
* <code>index</code> to <code>buff</code>.
*/
public
void
append
(
StringBu
ff
er
buff
,
String
formatting
,
int
[]
index
,
public
void
append
(
StringBu
ild
er
buff
,
String
formatting
,
int
[]
index
,
String
placeholder
)
throws
ParseException
{
boolean
inString
=
index
[
0
]
<
formatting
.
length
();
...
...
src/share/classes/javax/swing/text/NumberFormatter.java
浏览文件 @
86c8c165
...
...
@@ -27,7 +27,6 @@ package javax.swing.text;
import
java.lang.reflect.*
;
import
java.text.*
;
import
java.util.*
;
import
javax.swing.text.*
;
/**
* <code>NumberFormatter</code> subclasses <code>InternationalFormatter</code>
...
...
@@ -132,7 +131,7 @@ public class NumberFormatter extends InternationalFormatter {
DecimalFormatSymbols
dfs
=
getDecimalFormatSymbols
();
if
(
dfs
!=
null
)
{
StringBu
ffer
sb
=
new
StringBuff
er
();
StringBu
ilder
sb
=
new
StringBuild
er
();
sb
.
append
(
dfs
.
getCurrencySymbol
());
sb
.
append
(
dfs
.
getDecimalSeparator
());
...
...
@@ -239,13 +238,6 @@ public class NumberFormatter extends InternationalFormatter {
return
null
;
}
/**
*/
private
boolean
isValidInsertionCharacter
(
char
aChar
)
{
return
(
Character
.
isDigit
(
aChar
)
||
specialChars
.
indexOf
(
aChar
)
!=
-
1
);
}
/**
* Subclassed to return false if <code>text</code> contains in an invalid
* character to insert, that is, it is not a digit
...
...
@@ -402,28 +394,6 @@ public class NumberFormatter extends InternationalFormatter {
return
false
;
}
/**
* Returns true if the range offset to length identifies the only
* integer field.
*/
private
boolean
isOnlyIntegerField
(
int
offset
,
int
length
)
{
if
(
isValidMask
())
{
int
start
=
getAttributeStart
(
NumberFormat
.
Field
.
INTEGER
);
if
(
start
!=
-
1
)
{
AttributedCharacterIterator
iterator
=
getIterator
();
iterator
.
setIndex
(
start
);
if
(
offset
>
start
||
iterator
.
getRunLimit
(
NumberFormat
.
Field
.
INTEGER
)
>
(
offset
+
length
))
{
return
false
;
}
return
true
;
}
}
return
false
;
}
/**
* Invoked to toggle the sign. For this to work the value class
* must have a single arg constructor that takes a String.
...
...
src/share/classes/javax/swing/text/PlainDocument.java
浏览文件 @
86c8c165
...
...
@@ -25,7 +25,6 @@
package
javax.swing.text
;
import
java.util.Vector
;
import
javax.swing.event.*
;
/**
* A plain document that maintains no character attributes. The
...
...
@@ -118,7 +117,7 @@ public class PlainDocument extends AbstractDocument {
Object
filterNewlines
=
getProperty
(
"filterNewlines"
);
if
((
filterNewlines
instanceof
Boolean
)
&&
filterNewlines
.
equals
(
Boolean
.
TRUE
))
{
if
((
str
!=
null
)
&&
(
str
.
indexOf
(
'\n'
)
>=
0
))
{
StringBu
ffer
filtered
=
new
StringBuff
er
(
str
);
StringBu
ilder
filtered
=
new
StringBuild
er
(
str
);
int
n
=
filtered
.
length
();
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
if
(
filtered
.
charAt
(
i
)
==
'\n'
)
{
...
...
@@ -204,11 +203,9 @@ public class PlainDocument extends AbstractDocument {
}
}
if
(
hasBreaks
)
{
int
rmCount
=
1
;
removed
.
addElement
(
rmCandidate
);
if
((
offset
+
length
==
rmOffs1
)
&&
(
lastOffset
!=
rmOffs1
)
&&
((
index
+
1
)
<
lineMap
.
getElementCount
()))
{
rmCount
+=
1
;
Element
e
=
lineMap
.
getElement
(
index
+
1
);
removed
.
addElement
(
e
);
rmOffs1
=
e
.
getEndOffset
();
...
...
src/share/classes/javax/swing/text/TabSet.java
浏览文件 @
86c8c165
...
...
@@ -199,7 +199,7 @@ public class TabSet implements Serializable
*/
public
String
toString
()
{
int
tabCount
=
getTabCount
();
StringBu
ffer
buffer
=
new
StringBuff
er
(
"[ "
);
StringBu
ilder
buffer
=
new
StringBuild
er
(
"[ "
);
for
(
int
counter
=
0
;
counter
<
tabCount
;
counter
++)
{
if
(
counter
>
0
)
...
...
src/share/classes/javax/swing/text/html/FormView.java
浏览文件 @
86c8c165
...
...
@@ -362,7 +362,7 @@ public class FormView extends ComponentView implements ActionListener {
*/
public
void
actionPerformed
(
ActionEvent
evt
)
{
Element
element
=
getElement
();
StringBu
ffer
dataBuffer
=
new
StringBuff
er
();
StringBu
ilder
dataBuffer
=
new
StringBuild
er
();
HTMLDocument
doc
=
(
HTMLDocument
)
getDocument
();
AttributeSet
attr
=
element
.
getAttributes
();
...
...
@@ -508,7 +508,7 @@ public class FormView extends ComponentView implements ActionListener {
*/
protected
void
imageSubmit
(
String
imageData
)
{
StringBu
ffer
dataBuffer
=
new
StringBuff
er
();
StringBu
ilder
dataBuffer
=
new
StringBuild
er
();
Element
elem
=
getElement
();
HTMLDocument
hdoc
=
(
HTMLDocument
)
elem
.
getDocument
();
getFormData
(
dataBuffer
);
...
...
@@ -589,7 +589,7 @@ public class FormView extends ComponentView implements ActionListener {
* @param targetElement the element that triggered the
* form submission
*/
void
getFormData
(
StringBuff
er
buffer
)
{
private
void
getFormData
(
StringBuild
er
buffer
)
{
Element
formE
=
getFormElement
();
if
(
formE
!=
null
)
{
ElementIterator
it
=
new
ElementIterator
(
formE
);
...
...
@@ -623,7 +623,7 @@ public class FormView extends ComponentView implements ActionListener {
* data is loaded in name/value pairs.
*
*/
private
void
loadElementDataIntoBuffer
(
Element
elem
,
StringBu
ff
er
buffer
)
{
private
void
loadElementDataIntoBuffer
(
Element
elem
,
StringBu
ild
er
buffer
)
{
AttributeSet
attr
=
elem
.
getAttributes
();
String
name
=
(
String
)
attr
.
getAttribute
(
HTML
.
Attribute
.
NAME
);
...
...
@@ -692,29 +692,6 @@ public class FormView extends ComponentView implements ActionListener {
}
if
(
path
!=
null
&&
path
.
length
()
>
0
)
{
value
=
path
;
/*
try {
Reader reader = new BufferedReader(new FileReader(path));
StringBuffer buffer = new StringBuffer();
char[] cBuff = new char[1024];
int read;
try {
while ((read = reader.read(cBuff)) != -1) {
buffer.append(cBuff, 0, read);
}
} catch (IOException ioe) {
buffer = null;
}
try {
reader.close();
} catch (IOException ioe) {}
if (buffer != null) {
value = buffer.toString();
}
} catch (IOException ioe) {}
*/
}
}
return
value
;
...
...
@@ -740,7 +717,7 @@ public class FormView extends ComponentView implements ActionListener {
* form element. Basically, only items that are selected
* and have their name attribute set are added to the buffer.
*/
private
void
loadSelectData
(
AttributeSet
attr
,
StringBu
ff
er
buffer
)
{
private
void
loadSelectData
(
AttributeSet
attr
,
StringBu
ild
er
buffer
)
{
String
name
=
(
String
)
attr
.
getAttribute
(
HTML
.
Attribute
.
NAME
);
if
(
name
==
null
)
{
...
...
@@ -771,7 +748,7 @@ public class FormView extends ComponentView implements ActionListener {
* URLEncoder.encode() method before being added to the
* buffer.
*/
private
void
appendBuffer
(
StringBu
ff
er
buffer
,
String
name
,
String
value
)
{
private
void
appendBuffer
(
StringBu
ild
er
buffer
,
String
name
,
String
value
)
{
if
(
buffer
.
length
()
>
0
)
{
buffer
.
append
(
'&'
);
}
...
...
src/share/classes/javax/swing/text/html/MinimalHTMLWriter.java
浏览文件 @
86c8c165
...
...
@@ -691,11 +691,11 @@ public class MinimalHTMLWriter extends AbstractWriter {
if
(
styleNameMapping
==
null
)
{
return
style
;
}
StringBu
ff
er
sb
=
null
;
StringBu
ild
er
sb
=
null
;
for
(
int
counter
=
style
.
length
()
-
1
;
counter
>=
0
;
counter
--)
{
if
(!
isValidCharacter
(
style
.
charAt
(
counter
)))
{
if
(
sb
==
null
)
{
sb
=
new
StringBu
ff
er
(
style
);
sb
=
new
StringBu
ild
er
(
style
);
}
sb
.
setCharAt
(
counter
,
'a'
);
}
...
...
src/share/classes/javax/swing/text/html/StyleSheet.java
浏览文件 @
86c8c165
...
...
@@ -998,7 +998,7 @@ public class StyleSheet extends StyleContext {
void
addRule
(
String
[]
selector
,
AttributeSet
declaration
,
boolean
isLinked
)
{
int
n
=
selector
.
length
;
StringBu
ffer
sb
=
new
StringBuff
er
();
StringBu
ilder
sb
=
new
StringBuild
er
();
sb
.
append
(
selector
[
0
]);
for
(
int
counter
=
1
;
counter
<
n
;
counter
++)
{
sb
.
append
(
' '
);
...
...
src/share/classes/javax/swing/text/html/parser/Parser.java
浏览文件 @
86c8c165
...
...
@@ -1470,7 +1470,7 @@ class Parser implements DTDConstants {
*/
public
String
parseDTDMarkup
()
throws
IOException
{
StringBu
ffer
strBuff
=
new
StringBuff
er
();
StringBu
ilder
strBuff
=
new
StringBuild
er
();
ch
=
readCh
();
while
(
true
)
{
switch
(
ch
)
{
...
...
src/share/classes/javax/swing/text/rtf/AbstractFilter.java
浏览文件 @
86c8c165
...
...
@@ -160,7 +160,7 @@ abstract class AbstractFilter extends OutputStream
public
void
write
(
byte
[]
buf
,
int
off
,
int
len
)
throws
IOException
{
StringBu
ff
er
accumulator
=
null
;
StringBu
ild
er
accumulator
=
null
;
while
(
len
>
0
)
{
short
b
=
(
short
)
buf
[
off
];
...
...
@@ -178,7 +178,7 @@ abstract class AbstractFilter extends OutputStream
char
ch
=
translationTable
[
b
];
if
(
ch
!=
(
char
)
0
)
{
if
(
accumulator
==
null
)
accumulator
=
new
StringBu
ff
er
();
accumulator
=
new
StringBu
ild
er
();
accumulator
.
append
(
ch
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录