private byte[] trimBytes(int p_columnIndex, byte[] p_bytes) throws SQLException { //we need to trim if maxsize is set and the length is greater than maxsize and the //type of this column is a candidate for trimming if (maxFieldSize > 0 && p_bytes.length > maxFieldSize && isColumnTrimmable(p_columnIndex)) { byte[] l_bytes = new byte[maxFieldSize]; System.arraycopy (p_bytes, 0, l_bytes, 0, maxFieldSize); return l_bytes; } else { return p_bytes; } }
private String trimString(int p_columnIndex, String p_string) throws SQLException { //we need to trim if maxsize is set and the length is greater than maxsize and the //type of this column is a candidate for trimming if (maxFieldSize > 0 && p_string.length() > maxFieldSize && isColumnTrimmable(p_columnIndex)) { return p_string.substring(0, maxFieldSize); } else { return p_string; } }
private byte[] trimBytes(int p_columnIndex, byte[] p_bytes) throws SQLException { //we need to trim if maxsize is set and the length is greater than maxsize and the //type of this column is a candidate for trimming if (maxFieldSize > 0 && p_bytes.length > maxFieldSize && isColumnTrimmable(p_columnIndex)) { byte[] l_bytes = new byte[maxFieldSize]; System.arraycopy (p_bytes, 0, l_bytes, 0, maxFieldSize); return l_bytes; } else { return p_bytes; } }
private String trimString(int p_columnIndex, String p_string) throws SQLException { //we need to trim if maxsize is set and the length is greater than maxsize and the //type of this column is a candidate for trimming if (maxFieldSize > 0 && p_string.length() > maxFieldSize && isColumnTrimmable(p_columnIndex)) { return p_string.substring(0, maxFieldSize); } else { return p_string; } }
private String trimString(int p_columnIndex, String p_string) throws SQLException { //we need to trim if maxsize is set and the length is greater than maxsize and the //type of this column is a candidate for trimming if (maxFieldSize > 0 && p_string.length() > maxFieldSize && isColumnTrimmable(p_columnIndex)) { return p_string.substring(0, maxFieldSize); } else { return p_string; } }
private byte[] trimBytes(int p_columnIndex, byte[] p_bytes) throws SQLException { //we need to trim if maxsize is set and the length is greater than maxsize and the //type of this column is a candidate for trimming if (maxFieldSize > 0 && p_bytes.length > maxFieldSize && isColumnTrimmable(p_columnIndex)) { byte[] l_bytes = new byte[maxFieldSize]; System.arraycopy (p_bytes, 0, l_bytes, 0, maxFieldSize); return l_bytes; } else { return p_bytes; } }