mil.dod.th.ose.shell/src/mil/dod/th/ose/shell/ObservationCommands.java
private void writeObsFile(final UUID obsUuid, final byte[] obsXmlBytes) throws IOException
    {
        final File exportDir = m_FileService.getFile("exports");
        if (!m_FileService.doesFileExist(exportDir))
        {
            m_FileService.mkdir(exportDir);
        }
        
        final File xmlFile = m_FileService.getFile(exportDir, obsUuid + ".xml");
        try (FileOutputStream fileOut = m_FileService.createFileOutputStream(xmlFile))
        {
            fileOut.write(obsXmlBytes);
            fileOut.flush();
        }
    }
/**
     * Method that writes an XML file using the specified bytes.
     * 
     * @param obsUuid
     *      UUID of the observation the bytes represent. The filename will be based off of this.
     * @param obsXmlBytes
     *      Byte array that represents the XML file to be written.
     * @throws IOException
     *      Thrown if the file cannot be created or an issue writing to the file occurs.
     */
Method that writes an XML file using the specified bytes.

@param obsUuid
UUID of the observation the bytes represent. The filename will be based off of this.
@param obsXmlBytes
Byte array that represents the XML file to be written.
@throws IOException
Thrown if the file cannot be created or an issue writing to the file occurs.
Method that writes an XML file using the specified bytes . @param obsUuid UUID of the observation the bytes represent . The filename will be based off of this . @param obsXmlBytes Byte array that represents the XML file to be written . @throws IOException Thrown if the file cannot be created or an issue writing to the file occurs .
private void writeObsFile(final UUID obsUuid, final byte[] obsXmlBytes) throws IOException
    {
        final File exportDir = m_FileService.getFile("exports");
        if (!m_FileService.doesFileExist(exportDir))
        {
            m_FileService.mkdir(exportDir);
        }
        final File xmlFile = m_FileService.getFile(exportDir, obsUuid + ".xml");
        try (FileOutputStream fileOut = m_FileService.createFileOutputStream(xmlFile))
        {
            fileOut.write(obsXmlBytes);
            fileOut.flush();
        }
    }
private void writeObsFile ( final UUID obsUuid , final byte [ ] obsXmlBytes ) throws IOException { final File exportDir = m_FileService . getFile ( "exports" ) ; if ( ! m_FileService . doesFileExist ( exportDir ) ) { m_FileService . mkdir ( exportDir ) ; } final File xmlFile = m_FileService . getFile ( exportDir , obsUuid + ".xml" ) ; try ( FileOutputStream fileOut = m_FileService . createFileOutputStream ( xmlFile ) ) { fileOut . write ( obsXmlBytes ) ; fileOut . flush ( ) ; } }
Method that writes an XML file using the specified bytes.
Method that writes an XML file using the specified bytes .