8262403: Enhanced data transfers
Reviewed-by: rhalade, prr, vdyakov, ahgross
This commit is contained in:
parent
ef9315bead
commit
9accf7c894
@ -25,6 +25,7 @@
|
||||
|
||||
package java.awt.datatransfer;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
@ -321,9 +322,12 @@ MimeTypeParameterList(rawdata.substring(semIndex));
|
||||
ClassNotFoundException {
|
||||
String s = in.readUTF();
|
||||
if (s == null || s.length() == 0) { // long mime type
|
||||
byte[] ba = new byte[in.readInt()];
|
||||
in.readFully(ba);
|
||||
s = new String(ba);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = in.readInt();
|
||||
while (len-- > 0) {
|
||||
baos.write(in.readByte());
|
||||
}
|
||||
s = baos.toString();
|
||||
}
|
||||
try {
|
||||
parse(s);
|
||||
|
Loading…
Reference in New Issue
Block a user