| jcifs.smb.SmbFile jcifs.smb.SmbNamedPipe
SmbNamedPipe | public class SmbNamedPipe extends SmbFile (Code) | | This class will allow a Java program to read and write data to Named
Pipes and Transact NamedPipes.
There are three Win32 function calls provided by the Windows SDK
that are important in the context of using jCIFS. They are:
-
CallNamedPipe A message-type pipe call that opens,
writes to, reads from, and closes the pipe in a single operation.
-
TransactNamedPipe A message-type pipe call that
writes to and reads from an existing pipe descriptor in one operation.
-
CreateFile , ReadFile ,
WriteFile , and CloseFile A byte-type pipe can
be opened, written to, read from and closed using the standard Win32
file operations.
The jCIFS API maps all of these operations into the standard Java
XxxputStream interface. A special PIPE_TYPE
flags is necessary to distinguish which type of Named Pipe behavior
is desired.
SmbNamedPipe Constructor Examples |
Code Sample | Description |
new SmbNamedPipe( "smb://server/IPC$/PIPE/foo",
SmbNamedPipe.PIPE_TYPE_RDWR |
SmbNamedPipe.PIPE_TYPE_CALL );
|
Open the Named Pipe foo for reading and writing. The pipe will behave like the CallNamedPipe interface.
|
new SmbNamedPipe( "smb://server/IPC$/foo",
SmbNamedPipe.PIPE_TYPE_RDWR |
SmbNamedPipe.PIPE_TYPE_TRANSACT );
|
Open the Named Pipe foo for reading and writing. The pipe will behave like the TransactNamedPipe interface.
|
new SmbNamedPipe( "smb://server/IPC$/foo",
SmbNamedPipe.PIPE_TYPE_RDWR );
|
Open the Named Pipe foo for reading and writing. The pipe will
behave as though the CreateFile , ReadFile ,
WriteFile , and CloseFile interface was
being used.
|
See Using jCIFS to Connect to Win32
Named Pipes for a detailed description of how to use jCIFS with
Win32 Named Pipe server processes.
|
PIPE_TYPE_CALL | final public static int PIPE_TYPE_CALL(Code) | | Pipe operations should behave like the CallNamedPipe Win32 Named Pipe function.
|
PIPE_TYPE_DCE_TRANSACT | final public static int PIPE_TYPE_DCE_TRANSACT(Code) | | |
PIPE_TYPE_RDONLY | final public static int PIPE_TYPE_RDONLY(Code) | | The pipe should be opened read-only.
|
PIPE_TYPE_RDWR | final public static int PIPE_TYPE_RDWR(Code) | | The pipe should be opened for both reading and writing.
|
PIPE_TYPE_TRANSACT | final public static int PIPE_TYPE_TRANSACT(Code) | | Pipe operations should behave like the TransactNamedPipe Win32 Named Pipe function.
|
PIPE_TYPE_WRONLY | final public static int PIPE_TYPE_WRONLY(Code) | | The pipe should be opened only for writing.
|
SmbNamedPipe | public SmbNamedPipe(String url, int pipeType) throws MalformedURLException, UnknownHostException(Code) | | Open the Named Pipe resource specified by the url
parameter. The pipeType parameter should be at least one of
the PIPE_TYPE flags combined with the bitwise OR
operator | . See the examples listed above.
|
getNamedPipeInputStream | public InputStream getNamedPipeInputStream() throws IOException(Code) | | Return the InputStream used to read information
from this pipe instance. Presumably data would first be written
to the OutputStream associated with this Named
Pipe instance although this is not a requirement (e.g. a
read-only named pipe would write data to this stream on
connection). Reading from this stream may block. Therefore it
may be necessary that an addition thread be used to read and
write to a Named Pipe.
|
getNamedPipeOutputStream | public OutputStream getNamedPipeOutputStream() throws IOException(Code) | | Return the OutputStream used to write
information to this pipe instance. The act of writing data
to this stream will result in response data recieved in the
InputStream associated with this Named Pipe
instance (unless of course it does not elicite a response or the pipe is write-only).
|
Methods inherited from jcifs.smb.SmbFile | public boolean canRead() throws SmbException(Code)(Java Doc) public boolean canWrite() throws SmbException(Code)(Java Doc) void close(int f, long lastWriteTime) throws SmbException(Code)(Java Doc) void close(long lastWriteTime) throws SmbException(Code)(Java Doc) void close() throws SmbException(Code)(Java Doc) public void connect() throws IOException(Code)(Java Doc) void connect0() throws SmbException(Code)(Java Doc) public void copyTo(SmbFile dest) throws SmbException(Code)(Java Doc) void copyTo0(SmbFile dest, byte[][] b, int bsize, WriterThread w, SmbComReadAndX req, SmbComReadAndXResponse resp) throws SmbException(Code)(Java Doc) public void createNewFile() throws SmbException(Code)(Java Doc) public long createTime() throws SmbException(Code)(Java Doc) public void delete() throws SmbException(Code)(Java Doc) void delete(String fileName) throws SmbException(Code)(Java Doc) void doFindFirstNext(ArrayList list, boolean files, String wildcard, int searchAttributes, SmbFilenameFilter fnf, SmbFileFilter ff) throws SmbException, UnknownHostException, MalformedURLException(Code)(Java Doc) void doNetEnum(ArrayList list, boolean files, String wildcard, int searchAttributes, SmbFilenameFilter fnf, SmbFileFilter ff) throws SmbException, UnknownHostException, MalformedURLException(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public boolean exists() throws SmbException(Code)(Java Doc) UniAddress getAddress() throws UnknownHostException(Code)(Java Doc) public int getAttributes() throws SmbException(Code)(Java Doc) public String getCanonicalPath()(Code)(Java Doc) public int getContentLength()(Code)(Java Doc) public long getDate()(Code)(Java Doc) public String getDfsPath() throws SmbException(Code)(Java Doc) public long getDiskFreeSpace() throws SmbException(Code)(Java Doc) public InputStream getInputStream() throws IOException(Code)(Java Doc) public long getLastModified()(Code)(Java Doc) public String getName()(Code)(Java Doc) public OutputStream getOutputStream() throws IOException(Code)(Java Doc) public String getParent()(Code)(Java Doc) public String getPath()(Code)(Java Doc) public Principal getPrincipal()(Code)(Java Doc) public String getServer()(Code)(Java Doc) public String getShare()(Code)(Java Doc) public int getType() throws SmbException(Code)(Java Doc) public String getUncPath()(Code)(Java Doc) String getUncPath0()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) boolean isConnected()(Code)(Java Doc) public boolean isDirectory() throws SmbException(Code)(Java Doc) public boolean isFile() throws SmbException(Code)(Java Doc) public boolean isHidden() throws SmbException(Code)(Java Doc) boolean isOpen()(Code)(Java Doc) boolean isWorkgroup0() throws UnknownHostException(Code)(Java Doc) public long lastModified() throws SmbException(Code)(Java Doc) public long length() throws SmbException(Code)(Java Doc) public String[] list() throws SmbException(Code)(Java Doc) public String[] list(SmbFilenameFilter filter) throws SmbException(Code)(Java Doc) String[] list(String wildcard, int searchAttributes, SmbFilenameFilter fnf, SmbFileFilter ff) throws SmbException(Code)(Java Doc) public SmbFile[] listFiles() throws SmbException(Code)(Java Doc) public SmbFile[] listFiles(String wildcard) throws SmbException(Code)(Java Doc) public SmbFile[] listFiles(SmbFilenameFilter filter) throws SmbException(Code)(Java Doc) public SmbFile[] listFiles(SmbFileFilter filter) throws SmbException(Code)(Java Doc) SmbFile[] listFiles(String wildcard, int searchAttributes, SmbFilenameFilter fnf, SmbFileFilter ff) throws SmbException(Code)(Java Doc) public void mkdir() throws SmbException(Code)(Java Doc) public void mkdirs() throws SmbException(Code)(Java Doc) void open(int flags, int attrs, int options) throws SmbException(Code)(Java Doc) int open0(int flags, int attrs, int options) throws SmbException(Code)(Java Doc) static String queryLookup(String query, String param)(Code)(Java Doc) Info queryPath(String path, int infoLevel) throws SmbException(Code)(Java Doc) public void renameTo(SmbFile dest) throws SmbException(Code)(Java Doc) void send(ServerMessageBlock request, ServerMessageBlock response) throws SmbException(Code)(Java Doc) void sendTransaction(SmbComTransaction request, SmbComTransactionResponse response) throws SmbException(Code)(Java Doc) public void setAttributes(int attrs) throws SmbException(Code)(Java Doc) public void setCreateTime(long time) throws SmbException(Code)(Java Doc) public void setLastModified(long time) throws SmbException(Code)(Java Doc) void setPathInformation(int attrs, long ctime, long mtime) throws SmbException(Code)(Java Doc) public void setReadOnly() throws SmbException(Code)(Java Doc) public void setReadWrite() throws SmbException(Code)(Java Doc) public String toString()(Code)(Java Doc) public URL toURL() throws MalformedURLException(Code)(Java Doc)
|
|
|