meu Servlet retorna um byte[] que é uma imagem e eu preciso apresentar no flex,
Servlet
OutputStream out = response.getOutputStream();
out.write(new EmpresaDAO().getLogoEmpresa(idEmpresa)// retorno desse cara eh o byte[] da imagem);
out.flush();
out.close();
no flex …
<mx:HTTPService id="httpDownload"
method="POST"
result="resultDownload(event)"
showBusyCursor="true">
</mx:HTTPService>
[Bindable]
public var imagemLogo : ByteArray = null;
public function resultDownload(e : ResultEvent):void {
imagemLogo = e.resultlt as ByteArray;
}
<mx:Image x="8.5" y="10" height="130" width="221" id="imgLogo" source="{imagemLogo}"/>
o retorno esta ok! mas nao carrega a imagem, o que pode ser ?