} else if ( data instanceof NodeRepositoryFileData ) {
fos.write( inputStreamToBytes( new ByteArrayInputStream( ( (NodeRepositoryFileData) data ).getNode().toString()
.getBytes() ) ) );
}
} catch ( FileNotFoundException e ) {
throw new UnifiedRepositoryException( "Error writing file [" + fileNameWithPath + "]", e );
} catch ( IOException e ) {
throw new UnifiedRepositoryException( "Error writing file [" + fileNameWithPath + "]", e );
} finally {
IOUtils.closeQuietly( fos );
}
return internalGetFile( f );