code: public File processNamespaceHeader(String resourceLocation,
              File rawNamespace, File namespaceHomeFile)
              throws IndexingFailure {
          NamespaceHeaderParser nshParser = new NamespaceHeaderParser();
          NamespaceHeader namespaceHeader;
  
          try {
              namespaceHeader = nshParser.parseNamespace(resourceLocation,
                      rawNamespace);
              characterStopOffset = nshParser.getNextCharacterOffset();
          } catch (IOException e) {
              final String name = rawNamespace.getAbsolutePath();
              throw new IndexingFailure(name, e);
          } catch (BELDataMissingPropertyException e) {
              final String name = rawNamespace.getAbsolutePath();
              throw new IndexingFailure(name, e);
          } catch (BELDataConversionException e) {
              final String name = rawNamespace.getAbsolutePath();
              throw new IndexingFailure(name, e);
          }
  
          String output = asPath(namespaceHomeFile.getAbsolutePath(),
                  "namespace.header");
          ObjectOutputStream oos = null;
          try {
              oos = new ObjectOutputStream(
                      new FileOutputStream(output));
              oos.writeObject(namespaceHeader);
              return new File(output);
          } catch (IOException e) {
              final String msg = "Error writing namespace header.";
              throw new IndexingFailure(resourceLocation, msg, e);
          } finally {
              if (oos != null) {
                  try {
                      oos.close();
                  } catch (IOException e) {}
              }
          }
      }
docs: Processes a namespace {@link File} into a {@link NamespaceHeader} that
  is then written to the file system.
  
  @param rawNamespace {@link File}, the raw namespace file to parse
  @param namespaceHomeFile {@link File}, the namespace header file to
  write to
  @return {@link File} the file location of the local parsed namespace
  header file
  @throws IndexingFailure Throws an namespace indexing exception is the
  namespace header processing fails