Package jcifs.smb1.netbios
Class NbtSocket
- java.lang.Object
-
- java.net.Socket
-
- jcifs.smb1.netbios.NbtSocket
-
- All Implemented Interfaces:
Closeable,AutoCloseable
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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()InputStreamgetInputStream()InetAddressgetLocalAddress()intgetLocalPort()NbtAddressgetNbtAddress()OutputStreamgetOutputStream()intgetPort()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 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:
getInputStreamin classSocket- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Overrides:
getOutputStreamin classSocket- Throws:
IOException
-
getLocalAddress
public InetAddress getLocalAddress()
- Overrides:
getLocalAddressin classSocket
-
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPortin classSocket
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException
-
-