package Ġcom . ang cy o . server Ċ Ċ import Ġandroid . graphics . Bitmap Ċ import Ġcom . ang cy o . library . ex . to Bytes Ċ import Ġcom . ang cy o . library . ex . to InputStream Ċ import Ġcom . yan zh en j ie . and server . framework . body . Stream Body Ċ import Ġcom . yan zh en j ie . and server . http . HttpResponse Ċ import Ġcom . yan zh en j ie . and server . util . MediaType Ċ import Ġjava . io . InputStream Ċ Ċ /** Ċ Ġ* Ċ Ġ* ĠEmail : ang cy o @ 1 2 6 . com Ċ Ġ* Ġ@ author Ġang cy o Ċ Ġ* Ġ@ date Ġ 2 0 2 1 / 0 7 / 0 6 Ċ Ġ* ĠCopyright Ġ( c ) Ġ 2 0 2 0 Ġang cy o . ĠAll Ġrights Ġreserved . Ċ Ġ*/ Ċ Ċ /** åıĳéĢģ åĽ¾çīĩ */ Ċ fun ĠHttpResponse . send Bitmap ( bitmap : ĠBitmap , Ġmedia Type : ĠMediaType Ġ= ĠMediaType . IMAGE _ PNG ) Ġ{ ĊĠĠĠ Ġval Ġbytes Ġ= Ġbitmap . to Bytes () ĊĠĠĠ Ġval ĠinputStream : ĠInputStream ? Ġ= Ġbytes ?. to InputStream () ĊĠĠĠ Ġset Body ( Stream Body ( inputStream , Ġ( bytes ?. size Ġ?: Ġ 0 ). to Long (), Ġmedia Type )) Ċ }