1 package com.atlassian.core.util;
2
3 import java.io.BufferedInputStream;
4 import java.io.IOException;
5 import java.io.InputStream;
6
7
8
9
10
11 public class ReusableBufferedInputStream extends BufferedInputStream
12 {
13 public ReusableBufferedInputStream(InputStream inputStream)
14 {
15 super(inputStream);
16 super.mark(Integer.MAX_VALUE);
17 }
18
19
20
21
22
23 @Override
24 public void close() throws IOException
25 {
26 super.reset();
27 }
28
29
30
31
32
33 public void destroy() throws IOException
34 {
35 super.close();
36 }
37 }