mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-21 15:55:15 +00:00
8011234: Performance regression with ftp protocol when uploading in image mode
Reviewed-by: chegar
This commit is contained in:
parent
fa0b9daa08
commit
84e09062c0
@ -1299,16 +1299,16 @@ public class FtpClient extends sun.net.ftp.FtpClient {
|
||||
* <code>null</code> if the command was unsuccessful.
|
||||
* @throws IOException if an error occured during the transmission.
|
||||
*/
|
||||
public OutputStream putFileStream(String name, boolean unique) throws sun.net.ftp.FtpProtocolException, IOException {
|
||||
public OutputStream putFileStream(String name, boolean unique)
|
||||
throws sun.net.ftp.FtpProtocolException, IOException
|
||||
{
|
||||
String cmd = unique ? "STOU " : "STOR ";
|
||||
Socket s = openDataConnection(cmd + name);
|
||||
if (s == null) {
|
||||
return null;
|
||||
}
|
||||
if (type == TransferType.BINARY) {
|
||||
return s.getOutputStream();
|
||||
}
|
||||
return new sun.net.TelnetOutputStream(s.getOutputStream(), false);
|
||||
boolean bm = (type == TransferType.BINARY);
|
||||
return new sun.net.TelnetOutputStream(s.getOutputStream(), bm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user