Get Post Data from HTTP Request

zhaozj2021-02-16  53

/ ** Author: WHXBB * /

public byte [] getPostData (HttpServletRequest request) throws Exception {ServletInputStream data = request.getInputStream (); DataInputStream is = null; try {is = new DataInputStream (data);

ArrayList al = new arraylist (); while (true) {type {byte t = is.readbyte (); al.add (new byte (t));} catch (eofexception e) {Break;}} byte [] buffer = New byte [al.size ()];

For (int i = 0; i

转载请注明原文地址:https://www.9cbs.com/read-21440.html

New Post(0)