Changeset 15885
- Timestamp:
- 2008-06-05T16:14:20+12:00 (16 years ago)
- Location:
- release-kits/shared/ant-tasks/orans
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/ant-tasks/orans/SplitResource.java
r15884 r15885 60 60 //figure out how many chunks to do this in 61 61 int noChunks = (int)(resource.length() / chunkSize) + 1; 62 System.out.println( "File Size: " + resource.length() ); 63 System.out.println( "NoChunks: " + noChunks ); 64 System.out.println( "chunkSize: " + chunkSize ); 62 63 System.out.println( "Splitting file into chunks" ); 64 System.out.println( "file: " + resource.getAbsolutePath() ); 65 System.out.println( "file size: " + resource.length() ); 66 System.out.println( "chunk size: " + chunkSize ); 67 System.out.println( "ergo, num chunks: " + noChunks ); 65 68 66 69 long written = 0; 67 68 70 for ( int i=0; i<noChunks; i++ ) { 69 71 … … 71 73 DataOutputStream os; 72 74 File partFile = new File( outputDir, resource.getName() + "." + i ); 73 System.out.println( "partFile: " + partFile );75 //System.out.println( "partFile: " + partFile ); 74 76 75 77 try { … … 83 85 int thisChunkSize = chunkSize; 84 86 if ( i == noChunks - 1 ) { 85 System.out.println( "(Last Chunk)");87 //System.out.println( "(Last Chunk)"); 86 88 thisChunkSize = (int)(resource.length() % chunkSize); 87 89 } 88 90 89 System.out.println( "Read a chunk (" + thisChunkSize + " bytes)" );91 //System.out.println( "Read a chunk (" + thisChunkSize + " bytes)" ); 90 92 byte[] data = new byte[thisChunkSize]; 91 93 try { … … 97 99 } 98 100 99 System.out.println( "Write to the file");101 //System.out.println( "Write to the file"); 100 102 try { 101 103 os.write( data, 0, thisChunkSize ); … … 113 115 } 114 116 115 System.out.println( "written: " + written + " bytes" );117 //System.out.println( "Total written: " + written + " bytes" ); 116 118 117 119 try { … … 124 126 //if they have specified a resource script and resource name, write an rc file 125 127 if ( resourceScript != null && resourceName != null && resourceType != null ) { 126 System.out.println( "Put references into a resource script" );127 System.out.println( "resourceScript: " + resourceScript );128 System.out.println( "Putting references into a resource script" ); 129 System.out.println( "resourceScript: " + resourceScript.getAbsolutePath() ); 128 130 System.out.println( "resourceName : " + resourceName ); 129 131 System.out.println( "resourceType : " + resourceType );
Note:
See TracChangeset
for help on using the changeset viewer.