Skip to content

Commit 06bdf5b

Browse files
committed
Change default buffersize.
1 parent 8dd5cc9 commit 06bdf5b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

picasso/src/main/java/com/squareup/picasso/MarkableInputStream.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,22 @@
2525
* responsibility to keep track of these.
2626
*/
2727
final class MarkableInputStream extends InputStream {
28+
private static final int DEFAULT_BUFFER_SIZE = 4096;
29+
2830
private final InputStream in;
2931

3032
private long offset;
3133
private long reset;
3234
private long limit;
33-
3435
private long defaultMark = -1;
3536

3637
public MarkableInputStream(InputStream in) {
38+
this(in, DEFAULT_BUFFER_SIZE);
39+
}
40+
41+
public MarkableInputStream(InputStream in, int size) {
3742
if (!in.markSupported()) {
38-
in = new BufferedInputStream(in);
43+
in = new BufferedInputStream(in, size);
3944
}
4045
this.in = in;
4146
}

0 commit comments

Comments
 (0)