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 @Override
034 public int available() {
035 return _byteArrayInputStream.available();
036 }
037
038 @Override
039 public void close() throws IOException {
040 _byteArrayInputStream.close();
041 }
042
043 @Override
044 public void mark(int readLimit) {
045 _byteArrayInputStream.mark(readLimit);
046 }
047
048 @Override
049 public boolean markSupported() {
050 return _byteArrayInputStream.markSupported();
051 }
052
053 @Override
054 public int read() {
055 return _byteArrayInputStream.read();
056 }
057
058 @Override
059 public int read(byte[] bytes) throws IOException {
060 return _byteArrayInputStream.read(bytes);
061 }
062
063 @Override
064 public int read(byte[] bytes, int offset, int length) {
065 return _byteArrayInputStream.read(bytes, offset, length);
066 }
067
068 @Override
069 public int readLine(byte[] bytes, int offset, int length) {
070 return _byteArrayInputStream.read(bytes, offset, length);
071 }
072
073 @Override
074 public void reset() {
075 _byteArrayInputStream.reset();
076 }
077
078 @Override
079 public long skip(long skip) {
080 return _byteArrayInputStream.skip(skip);
081 }
082
083 private ByteArrayInputStream _byteArrayInputStream;
084
085 }