SessionInputBufferMock.java (httpcomponents-client-4.5.6-src) | : | SessionInputBufferMock.java (httpcomponents-client-4.5.7-src) | ||
---|---|---|---|---|
skipping to change at line 48 | skipping to change at line 48 | |||
import org.apache.http.impl.io.SessionInputBufferImpl; | import org.apache.http.impl.io.SessionInputBufferImpl; | |||
/** | /** | |||
* {@link org.apache.http.io.SessionInputBuffer} mockup implementation. | * {@link org.apache.http.io.SessionInputBuffer} mockup implementation. | |||
*/ | */ | |||
public class SessionInputBufferMock extends SessionInputBufferImpl { | public class SessionInputBufferMock extends SessionInputBufferImpl { | |||
public static final int BUFFER_SIZE = 16; | public static final int BUFFER_SIZE = 16; | |||
public SessionInputBufferMock( | public SessionInputBufferMock( | |||
final InputStream instream, | final InputStream inStream, | |||
final int buffersize, | final int bufferSize, | |||
final MessageConstraints constrains, | final MessageConstraints constrains, | |||
final CharsetDecoder decoder) { | final CharsetDecoder decoder) { | |||
super(new HttpTransportMetricsImpl(), buffersize, -1, constrains, decode | super(new HttpTransportMetricsImpl(), bufferSize, -1, constrains, decode | |||
r); | r); | |||
bind(instream); | bind(inStream); | |||
} | } | |||
public SessionInputBufferMock( | public SessionInputBufferMock( | |||
final InputStream instream, | final InputStream inStream, | |||
final int buffersize) { | final int bufferSize) { | |||
this(instream, buffersize, null, null); | this(inStream, bufferSize, null, null); | |||
} | } | |||
public SessionInputBufferMock( | public SessionInputBufferMock( | |||
final byte[] bytes, | final byte[] bytes, | |||
final int buffersize, | final int bufferSize, | |||
final MessageConstraints constrains, | final MessageConstraints constrains, | |||
final CharsetDecoder decoder) { | final CharsetDecoder decoder) { | |||
this(new ByteArrayInputStream(bytes), buffersize, constrains, decoder); | this(new ByteArrayInputStream(bytes), bufferSize, constrains, decoder); | |||
} | } | |||
public SessionInputBufferMock( | public SessionInputBufferMock( | |||
final byte[] bytes, | final byte[] bytes, | |||
final int buffersize, | final int bufferSize, | |||
final MessageConstraints constrains) { | final MessageConstraints constrains) { | |||
this(new ByteArrayInputStream(bytes), buffersize, constrains, null); | this(new ByteArrayInputStream(bytes), bufferSize, constrains, null); | |||
} | } | |||
public SessionInputBufferMock( | public SessionInputBufferMock( | |||
final byte[] bytes, | final byte[] bytes, | |||
final int buffersize) { | final int bufferSize) { | |||
this(new ByteArrayInputStream(bytes), buffersize); | this(new ByteArrayInputStream(bytes), bufferSize); | |||
} | } | |||
public SessionInputBufferMock( | public SessionInputBufferMock( | |||
final byte[] bytes) { | final byte[] bytes) { | |||
this(bytes, BUFFER_SIZE); | this(bytes, BUFFER_SIZE); | |||
} | } | |||
public SessionInputBufferMock( | public SessionInputBufferMock( | |||
final byte[] bytes, final Charset charset) { | final byte[] bytes, final Charset charset) { | |||
this(bytes, BUFFER_SIZE, null, charset != null ? charset.newDecoder() : null); | this(bytes, BUFFER_SIZE, null, charset != null ? charset.newDecoder() : null); | |||
End of changes. 8 change blocks. | ||||
14 lines changed or deleted | 14 lines changed or added |