Package jcifs.netbios
Class NbtSocket
- java.lang.Object
-
- java.net.Socket
-
- jcifs.netbios.NbtSocket
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class NbtSocket extends java.net.SocketDo 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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.io.InputStreamgetInputStream()java.net.InetAddressgetLocalAddress()intgetLocalPort()NbtAddressgetNbtAddress()java.io.OutputStreamgetOutputStream()intgetPort()java.lang.StringtoString()-
Methods inherited from class java.net.Socket
bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalSocketAddress, getOOBInline, getOption, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, supportedOptions
-
-
-
-
Constructor Detail
-
NbtSocket
public NbtSocket()
-
NbtSocket
public NbtSocket(NbtAddress address, int port) throws java.io.IOException
- Throws:
java.io.IOException
-
NbtSocket
public NbtSocket(NbtAddress address, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException
- 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
- Throws:
java.io.IOException
-
-
Method Detail
-
getNbtAddress
public NbtAddress getNbtAddress()
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Overrides:
getInputStreamin classjava.net.Socket- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException- Overrides:
getOutputStreamin classjava.net.Socket- Throws:
java.io.IOException
-
getPort
public int getPort()
- Overrides:
getPortin classjava.net.Socket
-
getLocalAddress
public java.net.InetAddress getLocalAddress()
- Overrides:
getLocalAddressin classjava.net.Socket
-
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPortin classjava.net.Socket
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.net.Socket
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.net.Socket- Throws:
java.io.IOException
-
-