Here you can find the source of toInputStream(byte[] bytes)
Parameter | Description |
---|---|
bytes | the array of bytes |
public static InputStream toInputStream(byte[] bytes)
//package com.java2s; //License from project: Apache License import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { /**//from w ww . j av a 2 s .c o m * Converts an array of bytes into an Input Stream * * @param bytes * the array of bytes * @return the Input Stream */ public static InputStream toInputStream(byte[] bytes) { return new ByteArrayInputStream(bytes); } }