test_class.file: pross-server/src/test/java/com/ibm/pross/server/util/AtomicFileOperationsTest.java
test_class.identifier: AtomicFileOperationsTest
test_case.body: @Test
  	public void testAtomicWrite() throws IOException {
  		
  		final File tempFile = File.createTempFile("test-file", UUID.randomUUID().toString());
  		tempFile.deleteOnExit();
  
  		for (int i = 0; i < 10; i++) {
  			final String str = new String("hello-" + i);
  			
  			long start = System.nanoTime();
  			AtomicFileOperations.atomicWriteString(tempFile, str);
  			long end = System.nanoTime();
  			System.out.println("Atomically wrote file in: " + (end - start) + " ns");
  			System.out.println("Wrote to: " + tempFile.getAbsolutePath());
  			
  			//String readString = (String) AtomicFileOperations.readObject(tempFile);
  			//Assert.assertEquals(str, readString);
  		}
  		
  		tempFile.delete();
  	}
test_case.class_method_signature: AtomicFileOperationsTest.testAtomicWrite()
test_case.full_signature: @Test public void testAtomicWrite()
test_case.identifier: testAtomicWrite
test_case.invocations: createTempFile toString randomUUID deleteOnExit nanoTime atomicWriteString nanoTime println println getAbsolutePath delete
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAtomicWrite()
focal_class.file: pross-server/src/main/java/com/ibm/pross/server/util/AtomicFileOperations.java
focal_class.identifier: AtomicFileOperations
focal_class.class_method_signature: AtomicFileOperations.atomicWriteSignedMessage(final File destinationFile, final SignedMessage signedMessage)
focal_class.full_signature: public static void atomicWriteSignedMessage(final File destinationFile, final SignedMessage signedMessage)
focal_class.identifier: atomicWriteSignedMessage
focal_class.modifiers: public static
focal_class.parameters: (final File destinationFile, final SignedMessage signedMessage)
focal_class.return: void
focal_class.signature: void atomicWriteSignedMessage(final File destinationFile, final SignedMessage signedMessage)
focal_class.class_method_signature: AtomicFileOperations.atomicWriteString(final File destinationFile, final String string)
focal_class.full_signature: public static void atomicWriteString(final File destinationFile, final String string)
focal_class.identifier: atomicWriteString
focal_class.modifiers: public static
focal_class.parameters: (final File destinationFile, final String string)
focal_class.return: void
focal_class.signature: void atomicWriteString(final File destinationFile, final String string)
focal_class.class_method_signature: AtomicFileOperations.atomicWriteBytes(final File destinationFile, final byte[] data)
focal_class.full_signature: public static void atomicWriteBytes(final File destinationFile, final byte[] data)
focal_class.identifier: atomicWriteBytes
focal_class.modifiers: public static
focal_class.parameters: (final File destinationFile, final byte[] data)
focal_class.return: void
focal_class.signature: void atomicWriteBytes(final File destinationFile, final byte[] data)
focal_class.class_method_signature: AtomicFileOperations.readSignedMessage(final File saveFile)
focal_class.full_signature: public static SignedMessage readSignedMessage(final File saveFile)
focal_class.identifier: readSignedMessage
focal_class.modifiers: public static
focal_class.parameters: (final File saveFile)
focal_class.return: SignedMessage
focal_class.signature: SignedMessage readSignedMessage(final File saveFile)
focal_method.body: public static void atomicWriteString(final File destinationFile, final String string)
  			throws SyncFailedException, IOException {
  		atomicWriteBytes(destinationFile, string.getBytes(StandardCharsets.UTF_8));
  	}
focal_method.class_method_signature: AtomicFileOperations.atomicWriteString(final File destinationFile, final String string)
focal_method.full_signature: public static void atomicWriteString(final File destinationFile, final String string)
focal_method.identifier: atomicWriteString
focal_method.invocations: atomicWriteBytes getBytes
focal_method.modifiers: public static
focal_method.parameters: (final File destinationFile, final String string)
focal_method.return: void
focal_method.signature: void atomicWriteString(final File destinationFile, final String string)