We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dd5cc9 commit 06bdf5bCopy full SHA for 06bdf5b
picasso/src/main/java/com/squareup/picasso/MarkableInputStream.java
@@ -25,17 +25,22 @@
25
* responsibility to keep track of these.
26
*/
27
final class MarkableInputStream extends InputStream {
28
+ private static final int DEFAULT_BUFFER_SIZE = 4096;
29
+
30
private final InputStream in;
31
32
private long offset;
33
private long reset;
34
private long limit;
-
35
private long defaultMark = -1;
36
37
public MarkableInputStream(InputStream in) {
38
+ this(in, DEFAULT_BUFFER_SIZE);
39
+ }
40
41
+ public MarkableInputStream(InputStream in, int size) {
42
if (!in.markSupported()) {
- in = new BufferedInputStream(in);
43
+ in = new BufferedInputStream(in, size);
44
}
45
this.in = in;
46
0 commit comments