문제

I need to write a function that gets a Json via Spring and deliver a Data. The case is that a customer is sending me a Filename and im looking in a database where the file is and send him the data. I only need a little kickstart and someone who can answer me to my Questions:

  • Do I really need Sockets for this?
  • What for a Stream I should use (Its several Datatypes likes Pictures, Documents, Pdf....)
  • How can I identify the Destination to send
도움이 되었습니까?

해결책

You can use Response like this :

String yourData;
JsonWriter writer = new JsonWriter(response.getWriter());
    writer.beginObject();
    writer.name("data").value(yourData);
    writer.endObject();
    writer.close();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top