Class NSStream

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol
Direct Known Subclasses:
NSInputStream, NSOutputStream

public class NSStream
extends NSObject
  • Constructor Details

  • Method Details

    • getDelegate

      public NSStreamDelegate getDelegate()
    • setDelegate

      public void setDelegate​(NSStreamDelegate v)
    • getStreamStatus

      public NSStreamStatus getStreamStatus()
    • getStreamError

      public NSError getStreamError()
    • setProperty

      public void setProperty​(NSStreamProperty key, NSObject value)
    • getSocketSecurityLevel

      public NSStreamSocketSecurityLevel getSocketSecurityLevel()
      Since:
      Available in iOS 2.0 and later.
    • setSocketSecurityLevel

      public NSStream setSocketSecurityLevel​(NSStreamSocketSecurityLevel securityLevel)
      Since:
      Available in iOS 2.0 and later.
    • getSOCKSProxyConfiguration

      public NSStreamSOCKSProxyConfiguration getSOCKSProxyConfiguration()
      Since:
      Available in iOS 2.0 and later.
    • setSOCKSProxyConfiguration

      public NSStream setSOCKSProxyConfiguration​(NSStreamSOCKSProxyConfiguration configuration)
      Since:
      Available in iOS 2.0 and later.
    • getDataWrittenToMemoryStream

      public NSData getDataWrittenToMemoryStream()
      Since:
      Available in iOS 2.0 and later.
    • setDataWrittenToMemoryStream

      public NSStream setDataWrittenToMemoryStream​(NSData data)
      Since:
      Available in iOS 2.0 and later.
    • getCurrentOffset

      public long getCurrentOffset()
      Since:
      Available in iOS 2.0 and later.
    • setCurrentOffset

      public NSStream setCurrentOffset​(long offset)
      Since:
      Available in iOS 2.0 and later.
    • getNetworkServiceType

      public NSStreamNetworkServiceType getNetworkServiceType()
      Since:
      Available in iOS 4.0 and later.
    • setNetworkServiceType

      public NSStream setNetworkServiceType​(NSStreamNetworkServiceType serviceType)
      Since:
      Available in iOS 4.0 and later.
    • getInputStreamToHost

      public static NSInputStream getInputStreamToHost​(String hostname, long port)
      Since:
      Available in iOS 8.0 and later.
    • getOutputStreamToHost

      public static NSOutputStream getOutputStreamToHost​(String hostname, long port)
      Since:
      Available in iOS 8.0 and later.
    • getBoundInputStream

      public static NSInputStream getBoundInputStream​(long bufferSize)
      Since:
      Available in iOS 8.0 and later.
    • getBoundOutputStream

      public static NSOutputStream getBoundOutputStream​(long bufferSize)
      Since:
      Available in iOS 8.0 and later.
    • scheduleInRunLoop

      public void scheduleInRunLoop​(NSRunLoop aRunLoop, NSRunLoopMode mode)
    • removeFromRunLoop

      public void removeFromRunLoop​(NSRunLoop aRunLoop, NSRunLoopMode mode)
    • open

      public void open()
    • close

      public void close()
    • getProperty

      public NSObject getProperty​(NSStreamProperty key)
    • setProperty

      protected boolean setProperty​(NSObject property, NSStreamProperty key)
    • scheduleInRunLoop

      public void scheduleInRunLoop​(NSRunLoop aRunLoop, String mode)
    • removeFromRunLoop

      public void removeFromRunLoop​(NSRunLoop aRunLoop, String mode)
    • getStreamsToHost

      @Deprecated protected static void getStreamsToHost​(String hostname, long port, NSInputStream.NSInputStreamPtr inputStream, NSOutputStream.NSOutputStreamPtr outputStream)
      Deprecated.
      Use nw_connection_t in Network framework instead
    • getBoundStreams

      protected static void getBoundStreams​(long bufferSize, NSInputStream.NSInputStreamPtr inputStream, NSOutputStream.NSOutputStreamPtr outputStream)