目錄
前言
android資料讀寫
android延時執行任務
launchMode總結
androidSQLite使用執行個體
android中反射技術使用執行個體
資料存儲(一)--SharedPreferences之你不知道的事
資料存儲 (二 )--SAX引擎XML存儲 (附Demo )
資料存儲 (三 )--JSON資料處理
程序間通信AIDL的使用執行個體
有關synchronized同步筆記
單線程模型中Message、Handler、MessageQueue、Looper之間的關系
本文檔使用看雲建構 -2-
前言
前言
原文出處 :Android基礎技術總結
作者 :tangnengwu
本系列文章經作者授權在看雲整理釋出 ,未經作者允許 ,請勿轉載 !
Android基礎技術總結
基礎知識總結 ,為進階奠基。
本文檔使用看雲建構 -3-
android資料讀寫
android資料讀寫
packagecom.example.filerw;
importjava.io.BufferedReader;
importjava.io.File;
importjava.io.FileInputStream;
importjava.io.BufferedInputStream;
importjava.io.BufferedOutputStream;
importjava.io.FileOutputStream;
importjava.io.IOException;
importjava.io.InputStream;
importjava.io.InputStreamReader;
importjava.io.OutputStream;
importjava.io.PrintStream;
importjava.io.RandomAccessFile;
import.URL;
importorg.apache.http.util.EncodingUtils;
importandroid.content.Context;
importandroid.graphics.Bitmap;
importandroid.graphics.BitmapFactory;
importandroid.os.Environment;
publicclassFileUtil
{
privateContextcontext;
publicFileUtil(Contextcontext)
{
this.context context;
}
publicStringreadFromData(StringfileName)
{
try
{
FileInputStreamfis context.openFileInput(fileName);
//圖檔如此操作
//InputStreamin newBufferedInputStream(fis);
//Bitmapbitmap BitmapFactory .decodeStream(in);
本文檔使用看雲建構 -4-
android資料讀寫