# ZFileTool

**PUBLIC METHOD**

```java
/***
* 將圖片檔以指定格式存取於內部資料夾(須包含副檔名)
* bitmap     將指定bitmap儲存於內部資料夾
* imageType  欲儲存的圖片檔之副檔名(需一致,png、jpg等)
* imageName  將此此檔案以此名稱(檔名+副檔名)儲存於內部資料夾
*/
public void saveImageToInternalStorage(Bitmap bitmap, Bitmap.CompressFormat imageType, String imageName)

//-------------

/***
* 將存於內部資料夾的圖片檔以Bitmap取出
* 如檔案不存在則取得null
* fileName  目標檔名+副檔名
*/
public Bitmap getImageFromInternalStorage(String fileName) 

//-------------

/***
* 存取檔案於內部資料夾
* fileName   將此此檔案以此名稱(檔名+副檔名)儲存於內部資料夾
* data       Image to byte[]
*/
public void saveFileToInternalStorage(String fileName, byte[] data)

//-------------

/***
* 讀取內部資料夾中的檔案以File取出
* 如檔案不存在則取得null
* fileName  目標檔名+副檔名
*/
public File getFIleFromInternalStorage(String fileName)

//-------------

/***
* 讀取 assets中的檔案為String
* fileName  目標檔名+副檔名
*/
public String getAssetsFileToString(String fileName) 

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://noel77543.gitbook.io/ztool/tool/io/zfiletool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
