001
014
015 package com.liferay.util.servlet;
016
017 import java.io.ByteArrayInputStream;
018 import java.io.IOException;
019
020 import javax.servlet.ServletInputStream;
021
022
025 public class ByteArrayInputStreamWrapper extends ServletInputStream {
026
027 public ByteArrayInputStreamWrapper(
028 ByteArrayInputStream byteArrayInputStream) {
029
030 _byteArrayInputStream = byteArrayInputStream;
031 }
032
033 public int available() {
034 return _byteArrayInputStream.available();
035 }
036
037 public void close() throws IOException {
038 _byteArrayInputStream.close();
039 }
040
041 public void mark(int readLimit) {
042 _byteArrayInputStream.mark(readLimit);
043 }
044
045 public boolean markSupported() {
046 return _byteArrayInputStream.markSupported();
047 }
048
049 public int read() {
050 return _byteArrayInputStream.read();
051 }
052
053 public int read(byte[] byteArray) throws IOException {
054 return _byteArrayInputStream.read(byteArray);
055 }
056
057 public int read(byte[] byteArray, int offset, int length) {
058 return _byteArrayInputStream.read(byteArray, offset, length);
059 }
060
061 public int readLine(byte[] byteArray, int offset, int length) {
062 return _byteArrayInputStream.read(byteArray, offset, length);
063 }
064
065 public void reset() {
066 _byteArrayInputStream.reset();
067 }
068
069 public long skip(long skip) {
070 return _byteArrayInputStream.skip(skip);
071 }
072
073 private ByteArrayInputStream _byteArrayInputStream;
074
075 }