jcifs.netbios
Class NbtSocket

java.lang.Object
  extended by java.net.Socket
      extended by jcifs.netbios.NbtSocket

public class NbtSocket
extends 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, InetAddress localAddr, int localPort)
           
NbtSocket(NbtAddress address, String calledName, int port, InetAddress localAddr, int localPort)
           
 
Method Summary
 void close()
           
 InputStream getInputStream()
           
 InetAddress getLocalAddress()
           
 int getLocalPort()
           
 NbtAddress getNbtAddress()
           
 OutputStream getOutputStream()
           
 int getPort()
           
 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, setPerformancePreferences, 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 IOException
Throws:
IOException

NbtSocket

public NbtSocket(NbtAddress address,
                 int port,
                 InetAddress localAddr,
                 int localPort)
          throws IOException
Throws:
IOException

NbtSocket

public NbtSocket(NbtAddress address,
                 String calledName,
                 int port,
                 InetAddress localAddr,
                 int localPort)
          throws IOException
Throws:
IOException
Method Detail

getNbtAddress

public NbtAddress getNbtAddress()

getInputStream

public InputStream getInputStream()
                           throws IOException
Overrides:
getInputStream in class Socket
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Overrides:
getOutputStream in class Socket
Throws:
IOException

getPort

public int getPort()
Overrides:
getPort in class Socket

getLocalAddress

public InetAddress getLocalAddress()
Overrides:
getLocalAddress in class Socket

getLocalPort

public int getLocalPort()
Overrides:
getLocalPort in class Socket

toString

public String toString()
Overrides:
toString in class Socket

close

public void close()
           throws IOException
Overrides:
close in class Socket
Throws:
IOException


Copyright © 2012. All Rights Reserved.