Code example for FileChannel

Methods: write

0
		{ 
			Log.e(tag, "file is not opened");
			return res;
		}		 
		try { 
			res = fc.write(buf);			
		} catch (IOException e) {
			// TODO Auto-generated catch block 
			Log.e(tag, "write fail");
			e.printStackTrace();			
		} 
		return res;
	} 
	 
	public void close(){ 
		try { 
			fos.flush();
			fc.close();
			fos.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block