java/sql-dk/src/info/globalcode/sql/dk/batch/BatchEncoder.java
branchv_0
changeset 146 4f4f515df807
parent 145 5f90decd3b59
child 147 4a704c1669f4
equal deleted inserted replaced
145:5f90decd3b59 146:4f4f515df807
    37 	public int encode(SQLCommand sqlCommand, OutputStream out) throws BatchException {
    37 	public int encode(SQLCommand sqlCommand, OutputStream out) throws BatchException {
    38 		try {
    38 		try {
    39 			ByteArrayOutputStream bufferAOS = new ByteArrayOutputStream();
    39 			ByteArrayOutputStream bufferAOS = new ByteArrayOutputStream();
    40 			DataOutputStream buffer = new DataOutputStream(bufferAOS);
    40 			DataOutputStream buffer = new DataOutputStream(bufferAOS);
    41 
    41 
    42 			buffer.write(BATCH_START);
    42 			buffer.write(BATCH_HEADER);
    43 
    43 
    44 			if (sqlCommand instanceof SQLCommandNamed) {
    44 			if (sqlCommand instanceof SQLCommandNamed) {
    45 				sqlCommand = ((SQLCommandNamed) sqlCommand).getSQLCommandNumbered();
    45 				sqlCommand = ((SQLCommandNamed) sqlCommand).getSQLCommandNumbered();
    46 			}
    46 			}
    47 
    47