test_class.declarator: INPUT = new File("src/test/resource/resfilter/ios/input.strings")
test_class.modifier: private static final
test_class.original_string: private static final File INPUT = new File("src/test/resource/resfilter/ios/input.strings");
test_class.type: File
test_class.var_name: INPUT
test_class.declarator: EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/ios/write-output.strings")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/ios/write-output.strings");
test_class.type: File
test_class.var_name: EXPECTED_WRITE_FILE
test_class.declarator: MERGE_INPUT_1_FILE = new File("src/test/resource/resfilter/ios/merge-input-1.strings")
test_class.modifier: private static final
test_class.original_string: private static final File MERGE_INPUT_1_FILE = new File("src/test/resource/resfilter/ios/merge-input-1.strings");
test_class.type: File
test_class.var_name: MERGE_INPUT_1_FILE
test_class.declarator: MERGE_INPUT_2_FILE = new File("src/test/resource/resfilter/ios/merge-input-2.strings")
test_class.modifier: private static final
test_class.original_string: private static final File MERGE_INPUT_2_FILE = new File("src/test/resource/resfilter/ios/merge-input-2.strings");
test_class.type: File
test_class.var_name: MERGE_INPUT_2_FILE
test_class.declarator: EXPECTED_MERGE_1_FILE = new File("src/test/resource/resfilter/ios/merge-output-1.strings")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_MERGE_1_FILE = new File("src/test/resource/resfilter/ios/merge-output-1.strings");
test_class.type: File
test_class.var_name: EXPECTED_MERGE_1_FILE
test_class.declarator: EXPECTED_MERGE_2_FILE = new File("src/test/resource/resfilter/ios/merge-output-2.strings")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_MERGE_2_FILE = new File("src/test/resource/resfilter/ios/merge-output-2.strings");
test_class.type: File
test_class.var_name: EXPECTED_MERGE_2_FILE
test_class.declarator: EXPECTED_INPUT_RES_LIST
test_class.modifier: private static final
test_class.original_string: private static final Collection<ResourceString> EXPECTED_INPUT_RES_LIST;
test_class.type: Collection<ResourceString>
test_class.var_name: EXPECTED_INPUT_RES_LIST
test_class.declarator: EXPECTED_GLOBAL_NOTES = Arrays.asList(
              " This is the first global comment... ",
              " This is the 2nd global comment... ")
test_class.modifier: private static final
test_class.original_string: private static final List<String> EXPECTED_GLOBAL_NOTES = Arrays.asList(
              " This is the first global comment... ",
              " This is the 2nd global comment... ");
test_class.type: List<String>
test_class.var_name: EXPECTED_GLOBAL_NOTES
test_class.declarator: WRITE_BUNDLE
test_class.modifier: private static
test_class.original_string: private static LanguageBundle WRITE_BUNDLE;
test_class.type: LanguageBundle
test_class.var_name: WRITE_BUNDLE
test_class.declarator: MERGE_BUNDLE
test_class.modifier: private static
test_class.original_string: private static LanguageBundle MERGE_BUNDLE;
test_class.type: LanguageBundle
test_class.var_name: MERGE_BUNDLE
test_class.declarator: res = new IOSStringsResource()
test_class.modifier: private static final
test_class.original_string: private static final IOSStringsResource res = new IOSStringsResource();
test_class.type: IOSStringsResource
test_class.var_name: res
test_class.file: gp-res-filter/src/test/java/com/ibm/g11n/pipeline/resfilter/impl/IOSStringsResourceTest.java
test_class.identifier: IOSStringsResourceTest
test_case.body: @Test
      public void testWrite() throws IOException, ResourceFilterException {
          File tempFile = File.createTempFile(this.getClass().getSimpleName(), ".strings");
          tempFile.deleteOnExit();
  
          try (OutputStream os = new FileOutputStream(tempFile)) {
              res.write(os, WRITE_BUNDLE, null);
              os.flush();
              assertTrue(ResourceTestUtil.compareFiles(EXPECTED_WRITE_FILE, tempFile));
          }
      }
test_case.class_method_signature: IOSStringsResourceTest.testWrite()
test_case.full_signature: @Test public void testWrite()
test_case.identifier: testWrite
test_case.invocations: createTempFile getSimpleName getClass deleteOnExit write flush assertTrue compareFiles
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWrite()
focal_class.declarator: CHAR_SET = "UTF-8"
focal_class.modifier: private static final
focal_class.original_string: private static final String CHAR_SET = "UTF-8";
focal_class.type: String
focal_class.var_name: CHAR_SET
focal_class.declarator: COMMENT_BEGIN = "/*"
focal_class.modifier: private static final
focal_class.original_string: private static final String COMMENT_BEGIN = "/*";
focal_class.type: String
focal_class.var_name: COMMENT_BEGIN
focal_class.declarator: COMMENT_END = "*/"
focal_class.modifier: private static final
focal_class.original_string: private static final String COMMENT_END = "*/";
focal_class.type: String
focal_class.var_name: COMMENT_END
focal_class.file: gp-res-filter/src/main/java/com/ibm/g11n/pipeline/resfilter/impl/IOSStringsResource.java
focal_class.identifier: IOSStringsResource
focal_class.class_method_signature: IOSStringsResource.parse(InputStream inStream, FilterOptions options)
focal_class.full_signature: @Override public LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_class.identifier: parse
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream inStream, FilterOptions options)
focal_class.return: LanguageBundle
focal_class.signature: LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_class.class_method_signature: IOSStringsResource.write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.full_signature: @Override public void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.return: void
focal_class.signature: void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.class_method_signature: IOSStringsResource.merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.full_signature: @Override public void merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.identifier: merge
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.return: void
focal_class.signature: void merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.class_method_signature: IOSStringsResource.formatEntry(String key, String value, List<String> notes, BreakIterator brkItr)
focal_class.full_signature: static String formatEntry(String key, String value, List<String> notes, BreakIterator brkItr)
focal_class.identifier: formatEntry
focal_class.modifiers: static
focal_class.parameters: (String key, String value, List<String> notes, BreakIterator brkItr)
focal_class.return: String
focal_class.signature: String formatEntry(String key, String value, List<String> notes, BreakIterator brkItr)
focal_class.superclass: extends ResourceFilter
focal_method.body: @Override
      public void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options) throws IOException, ResourceFilterException {
  
          BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outStream, CHAR_SET));
  
          boolean globalNotesWritten = false;
          for (String globalNote : languageBundle.getNotes()) {
              writer.write(COMMENT_BEGIN+globalNote+COMMENT_END);
              writer.newLine();
              globalNotesWritten = true;
          }
          if (globalNotesWritten) {
              writer.newLine();
          }
  
          BreakIterator brkItr = Utils.getWordBreakIterator(options);
  
          for (ResourceString res : languageBundle.getSortedResourceStrings()) {
              // empties the buffer
              writer.write(formatEntry(res.getKey(), res.getValue(), res.getNotes(), brkItr));
          }
  
          writer.flush();
      }
focal_method.class_method_signature: IOSStringsResource.write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_method.full_signature: @Override public void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_method.identifier: write
focal_method.invocations: getNotes write newLine newLine getWordBreakIterator getSortedResourceStrings write formatEntry getKey getValue getNotes flush
focal_method.modifiers: @Override public
focal_method.parameters: (OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_method.return: void
focal_method.signature: void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)