标签:
1
|
Resources res = getResources();
|
1
|
public static Bitmap drawableToBitmap(Drawable drawable) {
|
1
|
Bitmap bm=xxx; //xxx根据你的情况获取
|
1
|
String str = "String与InputStream相互转换";
|
这里提供几个方法。
方法1:
1
|
public String convertStreamToString(InputStream is) {
|
方法2:
1
|
public String inputStream2String (InputStream in) throws IOException {
|
方法3:
1
|
public static String inputStream2String(InputStream is) throws IOException{
|
1
|
private byte[] Bitmap2Bytes(Bitmap bm){
|
1
|
private Bitmap Bytes2Bimap(byte[] b){
|
【转】Drawable /Bitmap、String/InputStream、Bitmap/byte[]
标签:
原文地址:http://www.cnblogs.com/ryq2014/p/5692864.html