Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
dc-java
Commits
7244a16d
Commit
7244a16d
authored
Jul 24, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StringBuffer给定初始值, 避免内存溢出
parent
34a59135
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
AmazonAdProductJob.java
...d/src/main/java/com/bailuntec/job/AmazonAdProductJob.java
+1
-2
No files found.
data-base/base-sync-amazon-ad/src/main/java/com/bailuntec/job/AmazonAdProductJob.java
View file @
7244a16d
...
@@ -181,8 +181,7 @@ public class AmazonAdProductJob extends PointJob {
...
@@ -181,8 +181,7 @@ public class AmazonAdProductJob extends PointJob {
gzin
=
new
GZIPInputStream
(
response
.
body
().
byteStream
());
gzin
=
new
GZIPInputStream
(
response
.
body
().
byteStream
());
isr
=
new
InputStreamReader
(
gzin
,
"utf8"
);
isr
=
new
InputStreamReader
(
gzin
,
"utf8"
);
bufferedReader
=
new
BufferedReader
(
isr
);
bufferedReader
=
new
BufferedReader
(
isr
);
StringBuffer
sb
=
new
StringBuffer
((
int
)
response
.
body
().
contentLength
()
*
2
);
StringBuffer
sb
=
new
StringBuffer
();
String
str
=
null
;
String
str
=
null
;
while
((
str
=
bufferedReader
.
readLine
())
!=
null
)
{
while
((
str
=
bufferedReader
.
readLine
())
!=
null
)
{
sb
.
append
(
str
);
sb
.
append
(
str
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment