]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
4cf4585b0033413a47f6ffb2913229f43ef010f0
[tmp/jakarta-migration.git] /
1 package org.collectionspace.services.common.profile;
2
3 import javax.servlet.ServletInputStream;
4 import java.io.ByteArrayInputStream;
5
6 /* Subclass of ServletInputStream needed by the servlet engine.
7 All inputStream methods are wrapped and are delegated to
8 the ByteArrayInputStream (obtained as constructor parameter)!*/
9
10 public class BufferedServletInputStream extends ServletInputStream {
11     ByteArrayInputStream bais;
12     public BufferedServletInputStream(ByteArrayInputStream bais) {
13         this.bais = bais;
14     }
15
16     public int available() {
17         return bais.available();
18     }
19
20     public int read() {
21         return bais.read();
22     }
23
24     public int read(byte[] buf, int off, int len) {
25         return bais.read(buf, off, len);
26     }
27 }
28