/** * Returns the contents of the input stream as byte array. * @param stream the <code>InputStream</code> * @return the stream content as byte array */ public static byte[] getStreamAsByteArray(InputStream stream) { return getStreamAsByteArray(stream, -1); }
public void read(InputStream stream) throws IOException { if(null == stream) { this.content = null; } else { this.content = StreamUtil.getStreamAsByteArray(stream); } }
public void read(InputStream stream) throws IOException { if(null == stream) { this.content = null; } else { this.content = StreamUtil.getStreamAsByteArray(stream); } }
public void setBinaryStream(String parameterName, InputStream stream, int length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream, length); setObject(parameterName, new ByteArrayInputStream(data)); }
public MockSQLXML(InputStream inputStreamContent) { createXMLObjects(); content = StreamUtil.getStreamAsByteArray(inputStreamContent); wasFreeCalled = false; wasWriteMethodCalled = false; wasReadMethodCalled = false; }
public void setBinaryStream(String parameterName, InputStream stream, int length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream, length); setObject(parameterName, new ByteArrayInputStream(data)); }
public void setBinaryStream(int parameterIndex, InputStream stream, int length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream, length); setObject(parameterIndex, new ByteArrayInputStream(data)); }
public void updateBinaryStream(int columnIndex, InputStream stream) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream); updateObject(columnIndex, new ByteArrayInputStream(data)); }
public void updateBinaryStream(int columnIndex, InputStream stream, int length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream, length); updateObject(columnIndex, new ByteArrayInputStream(data)); }
public void updateBinaryStream(String columnName, InputStream stream) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream); updateObject(columnName, new ByteArrayInputStream(data)); }
public void updateBlob(int columnIndex, InputStream stream, long length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream, (int)length); updateBlob(columnIndex, new MockBlob(data)); }
public void updateBlob(String columnName, InputStream stream, long length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream, (int)length); updateBlob(columnName, new MockBlob(data)); }
public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(inputStream, (int)length); setBlob(parameterName, new MockBlob(data)); }
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(inputStream); setBlob(parameterIndex, new MockBlob(data)); }
public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(inputStream, (int)length); setBlob(parameterName, new MockBlob(data)); }
public void updateBlob(int columnIndex, InputStream stream) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream); updateBlob(columnIndex, new MockBlob(data)); }
public void updateBlob(String columnName, InputStream stream) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream); updateBlob(columnName, new MockBlob(data)); }
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(inputStream, (int)length); setBlob(parameterIndex, new MockBlob(data)); }
public void updateBlob(int columnIndex, InputStream stream) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(stream); updateBlob(columnIndex, new MockBlob(data)); }
public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { byte[] data = StreamUtil.getStreamAsByteArray(inputStream, (int)length); setBlob(parameterName, new MockBlob(data)); }