IT. Expert System.

Android Reference

LocalSocket


android.net

Class LocalSocket

  • All Implemented Interfaces:
    Closeable, AutoCloseable


    public class LocalSocket
    extends Object
    implements Closeable
    Creates a (non-server) socket in the UNIX-domain namespace. The interface here is not entirely unlike that of java.net.Socket
    • Constructor Detail

      • LocalSocket

        public LocalSocket()
        Creates a AF_LOCAL/UNIX domain stream socket.
    • Method Detail

      • toString

        public String toString()
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • connect

        public void connect(LocalSocketAddress endpoint)
                     throws IOException
        Connects this socket to an endpoint. May only be called on an instance that has not yet been connected.
        Parameters:
        endpoint - endpoint address
        Throws:
        IOException - if socket is in invalid state or the address does not exist.
      • bind

        public void bind(LocalSocketAddress bindpoint)
                  throws IOException
        Binds this socket to an endpoint name. May only be called on an instance that has not yet been bound.
        Parameters:
        bindpoint - endpoint address
        Throws:
        IOException
      • getLocalSocketAddress

        public LocalSocketAddress getLocalSocketAddress()
        Retrieves the name that this socket is bound to, if any.
        Returns:
        Local address or null if anonymous
      • getInputStream

        public InputStream getInputStream()
                                   throws IOException
        Retrieves the input stream for this instance.
        Returns:
        input stream
        Throws:
        IOException - if socket has been closed or cannot be created.
      • getOutputStream

        public OutputStream getOutputStream()
                                     throws IOException
        Retrieves the output stream for this instance.
        Returns:
        output stream
        Throws:
        IOException - if socket has been closed or cannot be created.
      • shutdownInput

        public void shutdownInput()
                           throws IOException
        Shuts down the input side of the socket.
        Throws:
        IOException
      • shutdownOutput

        public void shutdownOutput()
                            throws IOException
        Shuts down the output side of the socket.
        Throws:
        IOException
      • isConnected

        public boolean isConnected()
      • isClosed

        public boolean isClosed()
      • isBound

        public boolean isBound()
      • isOutputShutdown

        public boolean isOutputShutdown()
      • isInputShutdown

        public boolean isInputShutdown()
      • setFileDescriptorsForSend

        public void setFileDescriptorsForSend(FileDescriptor[] fds)
        Enqueues a set of file descriptors to send to the peer. The queue is one deep. The file descriptors will be sent with the next write of normal data, and will be delivered in a single ancillary message. See "man 7 unix" SCM_RIGHTS on a desktop Linux machine.
        Parameters:
        fds - non-null; file descriptors to send.
      • getAncillaryFileDescriptors

        public FileDescriptor[] getAncillaryFileDescriptors()
                                                     throws IOException
        Retrieves a set of file descriptors that a peer has sent through an ancillary message. This method retrieves the most recent set sent, and then returns null until a new set arrives. File descriptors may only be passed along with regular data, so this method can only return a non-null after a read operation.
        Returns:
        null or file descriptor array
        Throws:
        IOException
      • getPeerCredentials

        public Credentials getPeerCredentials()
                                       throws IOException
        Retrieves the credentials of this socket's peer. Only valid on connected sockets.
        Returns:
        non-null; peer credentials
        Throws:
        IOException
      • getFileDescriptor

        public FileDescriptor getFileDescriptor()
        Returns file descriptor or null if not yet open/already closed
        Returns:
        fd or null


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 451 / 158680910. Delta: 0.16697 с