ByteArrayOutputStream os = new ByteArrayOutputStream();InputStream is = new ByteArrayInputStream(os.toByteArray());