jcifs.netbios
Class NbtSocket

java.lang.Object
  extended byjava.net.Socket
      extended byjcifs.netbios.NbtSocket

public class NbtSocket
extends java.net.Socket

Do not use this class. Writing to the OutputStream of this type of socket requires leaving a 4 byte prefix for the NBT header. IOW you must call write( buf, 4, len ). Calling write( buf, 0, len ) will generate an error.


Constructor Summary
NbtSocket()
           
NbtSocket(NbtAddress address, int port)
           
NbtSocket(NbtAddress address, int port, java.net.InetAddress localAddr, int localPort)
           
NbtSocket(NbtAddress address, java.lang.String calledName, int port, java.net.InetAddress localAddr, int localPort)
           
 
Method Summary
 void close()
           
 java.io.InputStream getInputStream()
           
 java.net.InetAddress getLocalAddress()
           
 int getLocalPort()
           
 NbtAddress getNbtAddress()
           
 java.io.OutputStream getOutputStream()
           
 int getPort()
           
 java.lang.String toString()
           
 
Methods inherited from class java.net.Socket
bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalSocketAddress, getOOBInline, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NbtSocket

public NbtSocket()

NbtSocket

public NbtSocket(NbtAddress address,
                 int port)
          throws java.io.IOException

NbtSocket

public NbtSocket(NbtAddress address,
                 int port,
                 java.net.InetAddress localAddr,
                 int localPort)
          throws java.io.IOException

NbtSocket

public NbtSocket(NbtAddress address,
                 java.lang.String calledName,
                 int port,
                 java.net.InetAddress localAddr,
                 int localPort)
          throws java.io.IOException
Method Detail

getNbtAddress

public NbtAddress getNbtAddress()

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Throws:
java.io.IOException

getPort

public int getPort()

getLocalAddress

public java.net.InetAddress getLocalAddress()

getLocalPort

public int getLocalPort()

toString

public java.lang.String toString()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException