updates to make code build with Java 6

This commit is contained in:
Eric J. Bowersox 2010-01-22 04:57:03 +00:00
parent 8088e4fba0
commit 74b7958bae
3 changed files with 92 additions and 1 deletions

View File

@ -138,7 +138,7 @@
<target name="compile" depends="buildprep">
<javac srcdir="src" destdir="buildwork" debug="${compile.debug}" optimize="${compile.optimize}"
deprecation="${compile.deprecation}" source="1.3" target="1.3">
deprecation="${compile.deprecation}" source="1.5" target="1.5">
<classpath>
<pathelement location="buildwork"/>
<path refid="base.build.path"/>

View File

@ -115,6 +115,11 @@ public final class ServletMultipartHandler
} // end constructor
public void free()
{
actual_data = null;
}
public long length()
{
return actual_data.length;
@ -135,6 +140,11 @@ public final class ServletMultipartHandler
} // end getBinaryStream
public InputStream getBinaryStream(long pos, long length)
{
return new ByteArrayInputStream(actual_data,(int)pos,(int)length);
}
public long position(byte[] pattern, long start) throws SQLException
{
logger.warn("position() function is not implemented for MultipartDataValue");

View File

@ -18,6 +18,7 @@
package com.silverwrist.venice.db;
import java.sql.*;
import java.util.Properties;
class WrappedConnection implements Connection
{
@ -670,6 +671,86 @@ class WrappedConnection implements Connection
} // end prepareStatement
public Struct createStruct(String typename, Object[] attributes) throws SQLException
{
return conn.createStruct(typename,attributes);
} // end createStruct
public Array createArrayOf(String typename, Object[] elements) throws SQLException
{
return conn.createArrayOf(typename,elements);
} // end createArrayOf
public Properties getClientInfo() throws SQLException
{
return conn.getClientInfo();
} // end getClientInfo
public String getClientInfo(String name) throws SQLException
{
return conn.getClientInfo(name);
} // end getClientInfo
public void setClientInfo(Properties properties) throws SQLClientInfoException
{
conn.setClientInfo(properties);
} // end setClientInfo
public void setClientInfo(String name, String value) throws SQLClientInfoException
{
conn.setClientInfo(name,value);
} // end setClientInfo
public boolean isValid(int timeout) throws SQLException
{
return true;
} // end isValid
public SQLXML createSQLXML() throws SQLException
{
return conn.createSQLXML();
} // end createSQLXML
public NClob createNClob() throws SQLException
{
return conn.createNClob();
} // end createNClob
public Blob createBlob() throws SQLException
{
return conn.createBlob();
} // end createBlob
public Clob createClob() throws SQLException
{
return conn.createClob();
} // end createClob
public boolean isWrapperFor(Class<?> iface)
{
return (iface==Connection.class);
} // end isWrapperFor
public <T> T unwrap(Class<T> iface) throws SQLException
{
if (iface==Connection.class)
return iface.cast(conn);
throw new SQLException("invalid interface");
} // end unwrap
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------