Source/CSBackend/Platform/Android/Main/Java/com/chilliworks/chillisource/core/FileUtils.java
/**
	 * Writes a byte array to a file on internal storage. 
	 * Note: This method requires the Chilli Source activity to 
	 * have been created to work.
	 * 
	 * @author Ian Copland
	 * 
	 * @param The filename.
	 * @param The data to be written to file.
	 * @return Whether or not the file was successfully written.
	 */
Writes a byte array to a file on internal storage.
Note: This method requires the Chilli Source activity to
have been created to work.

@author Ian Copland

@param The filename.
@param The data to be written to file.
@return Whether or not the file was successfully written.
Writes a byte array to a file on internal storage . Note : This method requires the Chilli Source activity to have been created to work . @author Ian Copland @param The filename . @param The data to be written to file . @return Whether or not the file was successfully written .
private static boolean writeFileInternal(String in_filePath, byte[] in_fileContents)
	{
		boolean bSuccess = false;
		try
		{
			OutputStream stream = null;
			try
			{
				stream = new BufferedOutputStream(CSApplication.get().getAppContext().openFileOutput(in_filePath, CSActivity.MODE_PRIVATE));
				stream.write(in_fileContents);
				bSuccess = true;
			}
	        catch (Exception e)
	        {
	        	throw e;
	        }
			finally
			{
				if (stream != null)
				{
					stream.close();
				}
			}
		}
		catch (Exception e)
		{
			Logging.logError(ExceptionUtils.ConvertToString(e));
		}
		return bSuccess;
	}
private static boolean writeFileInternal ( String in_filePath , byte [ ] in_fileContents ) { boolean bSuccess = false ; try { OutputStream stream = null ; try { stream = new BufferedOutputStream ( CSApplication . get ( ) . getAppContext ( ) . openFileOutput ( in_filePath , CSActivity . MODE_PRIVATE ) ) ; stream . write ( in_fileContents ) ; bSuccess = true ; } catch ( Exception e ) { throw e ; } finally { if ( stream != null ) { stream . close ( ) ; } } } catch ( Exception e ) { Logging . logError ( ExceptionUtils . ConvertToString ( e ) ) ; } return bSuccess ; }
Writes a byte array to a file on internal storage.
Writes a byte array to a file on internal storage .