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