ExternalStream.st
changeset 23899 d7faafb6ee88
parent 23897 cb46a48b02b5
child 23900 6eee42de00b1
--- a/ExternalStream.st	Wed Mar 13 17:26:42 2019 +0100
+++ b/ExternalStream.st	Wed Mar 13 17:27:22 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -3140,59 +3138,6 @@
     "Modified: / 15.1.1998 / 11:49:48 / stefan"
 !
 
-copy:numberOfBytesOrNil into:outStream bufferSize:bufferSize
-    "read from the receiver, and write numberOfBytes data to another aWriteStream.
-     Return the number of bytes which have been transferred.
-     If nuberOfBytesOrNil is nil, copy until the end of myself.
-     Redefined to use operating system features to do a fast copy."
-
-    |pos n nWritten|
-
-    outStream isExternalStream ifTrue:[
-        "sendfile() in Linux does not support any combination of file/pipe/socket fds.
-         #copyFromFd:toFd:startIndex:count is curently not available in windows."
-
-        pos := self position.
-        numberOfBytesOrNil isNil ifTrue:[
-            n := self size - pos.
-        ] ifFalse:[
-            n := numberOfBytesOrNil.
-        ].
-        nWritten := OperatingSystem
-                        copyFromFd:self fileHandle
-                        toFd:outStream fileHandle
-                        startIndex:pos
-                        count:n.
-        nWritten > 0 ifTrue:[
-            self position:pos+nWritten.
-        ].
-        nWritten = n ifTrue:[
-            ^ self
-        ].
-    ].
-
-    "fall back..."
-    ^ super copy:numberOfBytesOrNil into:outStream bufferSize:bufferSize.
-
-    "
-     |in out|
-
-     in := 'Make.proto' asFilename readStream.
-     in copyToEndInto:Stdout.
-     in close.
-
-     |in out|
-
-     in := 'Make.proto' asFilename readStream.
-     out := '/tmp/test' asFilename writeStream.
-     in copyToEndInto:out.
-     in close. out close.
-     '/tmp/test' asFilename contents.
-    "
-
-    "Created: / 13-03-2019 / 16:27:04 / Stefan Vogel"
-!
-
 ioctl:ioctlNumber
     "to provide a simple ioctl facility - an ioctl is performed
      on the underlying file; no arguments are passed."
@@ -4902,7 +4847,7 @@
     "
 	(FileStream newTemporary
 	    nextPutUtf16:$B;
-	    nextPutUtf16:$Ä;
+	    nextPutUtf16:$Ä;
 	    nextPutUtf16:(Character codePoint:16r10CCCC);
 	    reset;
 	    binary;
@@ -6863,7 +6808,7 @@
     ].
 
     "
-	'Bönnigheim' asUnicode16String errorPrintCR
+	'Bönnigheim' asUnicode16String errorPrintCR
     "
 !