org.firebirdsql.gds.impl.jni.TransactionParameterBufferImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaybird Show documentation
Show all versions of jaybird Show documentation
JDBC Driver for the Firebird RDBMS
package org.firebirdsql.gds.impl.jni;
import java.io.ByteArrayOutputStream;
import org.firebirdsql.gds.ISCConstants;
import org.firebirdsql.gds.TransactionParameterBuffer;
/**
*
*/
public class TransactionParameterBufferImpl extends ParameterBufferBase
implements TransactionParameterBuffer {
/*
* (non-Javadoc)
*
* @see org.firebirdsql.gds.TransactionParameterBuffer#deepCopy()
*/
public TransactionParameterBuffer deepCopy() {
TransactionParameterBufferImpl result = new TransactionParameterBufferImpl();
result.getArgumentsList().addAll(this.getArgumentsList());
return result;
}
/**
* Pacakage local method for obtaining buffer suitable for passing to native
* method.
*
* @return
*/
byte[] getBytesForNativeCode() {
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byteArrayOutputStream.write(ISCConstants.isc_tpb_version3);
super.writeArgumentsTo(byteArrayOutputStream);
return byteArrayOutputStream.toByteArray();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy