/** 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)
{
try
{
byte t =is.readByte();
al.add(new Byte(t));
}
catch(EOFException e)
{
break;
}
}
byte[] buffer = new byte[al.size()];
for(int i = 0; i < buffer.length; i++)
{
buffer[i] = ((Byte)al.get(i)).byteValue();
}
return buffer;
}
catch(Exception e)
{
throw e;
}
finally
{
if (is != null)
is.close();
}
}