diff options
author | Nils Schwabe | 2014-07-11 14:41:30 +0200 |
---|---|---|
committer | Nils Schwabe | 2014-07-11 14:41:30 +0200 |
commit | 7de4f7d2881f9f8a10714f0ce49e62a3d7abea94 (patch) | |
tree | 509cc0bb72571985790321c29ac3271de07d0b25 /src/main/java/org/openslx/imagemaster/crcchecker/CRCFile.java | |
parent | [Thrift] Add method for server to check if he is authenticated (diff) | |
download | master-sync-shared-7de4f7d2881f9f8a10714f0ce49e62a3d7abea94.tar.gz master-sync-shared-7de4f7d2881f9f8a10714f0ce49e62a3d7abea94.tar.xz master-sync-shared-7de4f7d2881f9f8a10714f0ce49e62a3d7abea94.zip |
Make method to write a crc file to disk static
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/crcchecker/CRCFile.java')
-rw-r--r-- | src/main/java/org/openslx/imagemaster/crcchecker/CRCFile.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/openslx/imagemaster/crcchecker/CRCFile.java b/src/main/java/org/openslx/imagemaster/crcchecker/CRCFile.java index 9612361..49c909d 100644 --- a/src/main/java/org/openslx/imagemaster/crcchecker/CRCFile.java +++ b/src/main/java/org/openslx/imagemaster/crcchecker/CRCFile.java @@ -39,9 +39,9 @@ public class CRCFile * @param filename Where to save the created crc file * @throws IOException If it's not possible to write the file */ - public CRCFile( List<Integer> listOfCrcSums, String filename ) throws IOException + public static CRCFile writeCrcFile( List<Integer> listOfCrcSums, String filename ) throws IOException { - this.file = new File( filename ); + File file = new File( filename ); FileOutputStream fos = new FileOutputStream( file ); DataOutputStream dos = new DataOutputStream( fos ); @@ -50,7 +50,7 @@ public class CRCFile } dos.close(); - this.crcSums = listOfCrcSums; + return new CRCFile( filename ); } /** |