\r
@param buffer The buffer to put the result with alignment\r
**/\r
- public void toBuffer (DataOutputStream buffer, DataOutputStream orgBuffer){\r
+ public void toBuffer (DataOutputStream buffer){\r
File OutputFile;\r
byte data;\r
\r
try {\r
executeTool ();\r
} catch (Exception e) {\r
- throw new BuildException("Call tools failed!\n");\r
+ throw new BuildException("Call to executeTool failed!\n");\r
}\r
\r
///\r
OutputFile = new File (this.outPutFileName);\r
long fileLen = OutputFile.length();\r
if (!OutputFile.exists()) {\r
- throw new BuildException("The file " + outPutFileName + " is not exist!\n");\r
+ throw new BuildException("The file " + outPutFileName + " does not exist!\n");\r
}\r
\r
///\r
while (i < fileLen) {\r
data = In.readByte();\r
buffer.writeByte(data);\r
- //\r
- // Add data to org file\r
- //\r
- orgBuffer.writeByte(data);\r
i ++;\r
}\r
\r
while ((fileLen & 0x03) != 0) {\r
fileLen++;\r
buffer.writeByte(0);\r
- orgBuffer.writeByte(0);\r
}\r
In.close();\r
\r
} catch (Exception e) {\r
System.out.print(e.getMessage());\r
- throw new BuildException("Call tool2buffer failed!\n");\r
+ throw new BuildException("Tool call, toBuffer failed!\n");\r
}\r
}\r
\r
crcProcess.waitFor();\r
} catch (Exception e) {\r
System.out.print (e.getMessage());\r
- throw new BuildException("Execute tools fails!\n");\r
+ throw new BuildException("Execution of externalTool task failed!\n");\r
}\r
}\r
\r