*/privatestaticfinalRasterdecodeJPEG(byte[] data, JPEGDecodeParam decodeParam,booleancolorConvert,intminX,intminY){// Create an InputStream from the compressed data array.ByteArrayInputStream jpegStream =newByteArrayInputStream(data);// Create a decoder.JPEGImageDecoder decoder = decodeParam ==null?
InputStreamemptyInputStream=newByteArrayInputStream("".getBytes(UTF_8)); BitmapDrawabledrawable=(BitmapDrawable)Drawable.createFromStream(emptyInputStream,"source string value"); assertThat(shadowOf(drawable).getSource()).isEqualTo("source string value"); } 代码示例来源:origin: mikepenz/MaterialDrawer ...
方法名:createInputStream CachedOutputStream.createInputStream介绍 暂无 代码示例 代码示例来源:origin: apache/cxf public byte[] getBytes() throws IOException { flush(); if (inmem) { if (currentStream instanceof ByteArrayOutputStream) { return ((ByteArrayOutputStream)currentStream).toByteArray(); ...
createFromStream(new ByteArrayInputStream(card.getAvatar()), null); } catch (IOException e) { return null; } } Example 19Source File: QuestMonsterFragment.java From MonsterHunter4UDatabase with MIT License 4 votes @Override public void bindView(View view, Context context, Cursor cursor) { ...
public static Drawable byteToDrawable(byte[] byteArray) { ByteArrayInputStream ins = null; if (byteArray != null) { ins = new ByteArrayInputStream(byteArray); } return Drawable.createFromStream(ins, null); } 代码示例来源:origin: freedom10086/Ruisi /** * 获得板块图标 */ public...
createHmacSha1(handle, macKeyBytes, expDate); } else if (typeByte == 2) { byte[] macKeyBytes = new byte[256 / 8]; byteArrayInputStream.read(macKeyBytes); DataInputStream dataInputStream = new DataInputStream( byteArrayInputStream); long exp = dataInputStream.readLong(); Date expDate...
ByteArrayInputStream bis =newByteArrayInputStream(imageInByte); Bitmap blurTemplate = BitmapFactory.decodeStream(bis,null, options);finalAllocation input = Allocation.createFromBitmap(renderScript, blurTemplate);finalAllocation output = Allocation.createTyped(renderScript, input.getType());finalScriptIntrins...
class)); final InputStream inputStream = new ByteArrayInputStream(data); when(body.byteStream()).thenReturn(inputStream); final Request request = new Request.Builder().url(uri.toString()).build(); final Response response = new Response.Builder().protocol(HTTP_1_1).body(body).request(...
import java.io.ByteArrayInputStream; import java.util.Collections; import java.util.Enumeration; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import javax.servlet.Filter; import javax.servlet.ServletResponse; import javax.servlet.FilterChain; import javax.servlet...
44 common frames omitted Caused by: org.springframework.dao.DataAccessResourceFailureException: Jackson exception: Unrecognized token 'Client': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (ByteArrayInputStream); line: 1, column: 8] at...