byte[] nullTerminated = new byte[urlData.length];
byte[] nullTerminated = new byte[urlData.length + 1];
    public void iscAttachDatabase(String file_name, IscDbHandle db_handle,            DatabaseParameterBuffer databaseParameterBuffer)            throws GDSException {        if (db_handle == null) { throw new GDSException(                ISCConstants.isc_bad_db_handle); }        DatabaseParameterBuffer cleanDPB = ((DatabaseParameterBufferExtension)databaseParameterBuffer).removeExtensionParams();        final byte[] dpbBytes = databaseParameterBuffer == null ? null                : ((DatabaseParameterBufferImp) cleanDPB)                        .getBytesForNativeCode();        synchronized (this) {            String serverUrl = getServerUrl(file_name);                        byte[] urlData;            try {                String filenameCharset = databaseParameterBuffer.getArgumentAsString(ISCConstants.isc_dpb_filename_charset);                if (filenameCharset != null)                    urlData = serverUrl.getBytes(filenameCharset);                else                    urlData = serverUrl.getBytes();                                byte[] nullTerminated = new byte[urlData.length];                System.arraycopy(urlData, 0, nullTerminated, 0, urlData.length);                urlData = nullTerminated;            } catch(UnsupportedEncodingException ex) {                throw new GDSException(ISCConstants.isc_bad_dpb_content);            }                        native_isc_attach_database(urlData, db_handle,                    dpbBytes);        }        parseAttachDatabaseInfo(iscDatabaseInfo(db_handle,                DESCRIBE_DATABASE_INFO_BLOCK, 1024), db_handle);    }