Home > Back-end >  Java data receiving conversion issues
Java data receiving conversion issues

Time:05-26

I here the back-end call restTemplate to get the data, we get the response. The getBody (), the body data {" status ":" 040000 ", "errors" : ""," result ": {" data" : "H4s + this is a very long string, more than the size of the Java constant pool"}}, I'm going to get the data in the data, and then convert it to a byte array or string (note: if converted to strings, please use StringBuffer receiving, at the same time also produces a problem, StringBuffer data also cannot receive too long at a time, and length of the data in the data obviously exceeds limit), how do I get and conversion?

CodePudding user response:

If the data in the data can be more than Java constant pool size, could you tell me the response. The getBody () what do you is how to return, the body also {" status ":" 040000 ", "errors" : ""," result ": {" data" these things, the design is not reasonable, use what all can't accept, does not make sense

CodePudding user response:

I'm curious about how much, I can accept more than 100 million characters!


https://img-blog.csdnimg.cn/20210430162122471.png? X - oss - process=image/watermark, type_ZmFuZ3poZW5naGVpdGk, shadow_10, text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p5MTQwNA==, size_16, color_FFFFFF, t_70

You see this blog: https://blog.csdn.net/zy1404/article/details/116305729
  • Related