@param Buffer The point of output buffer\r
\r
**/\r
- public void toBuffer (DataOutputStream Buffer){\r
+ public void toBuffer (DataOutputStream buffer, DataOutputStream orgBuffer){\r
\r
Section sect;\r
File compressOut;\r
// Call each section class's toBuffer function.\r
//\r
try {\r
- sect.toBuffer(Do);\r
+ sect.toBuffer(Do, orgBuffer);\r
}\r
catch (BuildException e) {\r
System.out.print(e.getMessage());\r
Ch.SectionHeader.type = (byte) EFI_SECTION_COMPRESSION;\r
\r
//\r
- // Note: The compressName was not effective now. Using the\r
+ // Note: The compressName was not efsfective now. Using the\r
// EFI_STANDARD_COMPRSSION for compressType .\r
// That is follow old Genffsfile tools. Some code will be added for \r
// the different compressName;\r
//\r
// First add CompressHeader to Buffer, then add Compress data.\r
//\r
- Buffer.write (headerBuffer);\r
- Buffer.write(myCompress.outputBuffer); \r
+ buffer.write (headerBuffer);\r
+ buffer.write(myCompress.outputBuffer); \r
\r
//\r
- // 4 Byte aligment \r
+ // Buffer 4 Byte aligment \r
//\r
int size = Ch.GetSize() + myCompress.outputBuffer.length;\r
\r
while ((size & 0x03) != 0){\r
size ++;\r
- Buffer.writeByte(0);\r
+ buffer.writeByte(0);\r
+ }\r
+ //\r
+ // orgBuffer 4 Byte aligment\r
+ //\r
+ size = (int)compressOut.length();\r
+ while ((size & 0x03) != 0){\r
+ size ++;\r
+ orgBuffer.writeByte(0);\r
}\r
- \r
//\r
// Delete temp file\r
//\r