public class SmbNamedPipe extends SmbFile implements SmbPipeResource
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, context);
|
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, context);
|
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, context);
|
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, PIPE_TYPE_DCE_TRANSACT, PIPE_TYPE_RDONLY, PIPE_TYPE_RDWR, PIPE_TYPE_TRANSACT, PIPE_TYPE_UNSHARED, PIPE_TYPE_WRONLYATTR_ARCHIVE, ATTR_COMPRESSED, ATTR_DIRECTORY, ATTR_HIDDEN, ATTR_NORMAL, ATTR_READONLY, ATTR_SYSTEM, ATTR_TEMPORARY, ATTR_VOLUME, CAP_DFS, CAP_EXTENDED_SECURITY, CAP_LARGE_FILES, CAP_LARGE_READX, CAP_LARGE_WRITEX, CAP_LEVEL_II_OPLOCKS, CAP_LOCK_AND_READ, CAP_MPX_MODE, CAP_NONE, CAP_NT_FIND, CAP_NT_SMBS, CAP_RAW_MODE, CAP_RPC_REMOTE_APIS, CAP_STATUS32, CAP_UNICODE, CMD_OFFSET, DEFAULT_CONN_TIMEOUT, DEFAULT_MAX_MPX_COUNT, DEFAULT_NOTIFY_BUF_SIZE, DEFAULT_OEM_ENCODING, DEFAULT_PORT, DEFAULT_RCV_BUF_SIZE, DEFAULT_RESPONSE_TIMEOUT, DEFAULT_SHARING, DEFAULT_SND_BUF_SIZE, DEFAULT_SO_TIMEOUT, DEFAULT_SSN_LIMIT, DELETE, ERROR_CODE_OFFSET, FILE_APPEND_DATA, FILE_DELETE, FILE_EXECUTE, FILE_NO_SHARE, FILE_READ_ATTRIBUTES, FILE_READ_DATA, FILE_READ_EA, FILE_SHARE_DELETE, FILE_SHARE_READ, FILE_SHARE_WRITE, FILE_WRITE_ATTRIBUTES, FILE_WRITE_DATA, FILE_WRITE_EA, FLAGS_COPY_SOURCE_MODE_ASCII, FLAGS_COPY_TARGET_MODE_ASCII, FLAGS_LOCK_AND_READ_WRITE_AND_UNLOCK, FLAGS_NONE, FLAGS_NOTIFY_OF_MODIFY_ACTION, FLAGS_OFFSET, FLAGS_OPLOCK_REQUESTED_OR_GRANTED, FLAGS_PATH_NAMES_CANONICALIZED, FLAGS_PATH_NAMES_CASELESS, FLAGS_RECEIVE_BUFFER_POSTED, FLAGS_RESPONSE, FLAGS_TARGET_MUST_BE_DIRECTORY, FLAGS_TARGET_MUST_BE_FILE, FLAGS_TREE_COPY, FLAGS_VERIFY_ALL_WRITES, FLAGS2_EXTENDED_ATTRIBUTES, FLAGS2_EXTENDED_SECURITY_NEGOTIATION, FLAGS2_LONG_FILENAMES, FLAGS2_NONE, FLAGS2_PERMIT_READ_IF_EXECUTE_PERM, FLAGS2_RESOLVE_PATHS_IN_DFS, FLAGS2_SECURITY_REQUIRE_SIGNATURES, FLAGS2_SECURITY_SIGNATURES, FLAGS2_STATUS32, FLAGS2_UNICODE, FOREVER, GENERIC_ALL, GENERIC_EXECUTE, GENERIC_READ, GENERIC_WRITE, MILLISECONDS_BETWEEN_1970_AND_1601, O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY, OPEN_FUNCTION_FAIL_IF_EXISTS, OPEN_FUNCTION_OVERWRITE_IF_EXISTS, READ_CONTROL, SECURITY_SHARE, SECURITY_USER, SIGNATURE_OFFSET, SMB1_HEADER_LENGTH, SYNCHRONIZE, TID_OFFSET, TYPE_COMM, TYPE_FILESYSTEM, TYPE_NAMED_PIPE, TYPE_PRINTER, TYPE_SERVER, TYPE_SHARE, TYPE_WORKGROUP, WRITE_DAC, WRITE_OWNER| Constructor and Description |
|---|
SmbNamedPipe(String url,
int pipeType,
boolean unshared,
CIFSContext tc)
Open the Named Pipe resource specified by the url
parameter.
|
SmbNamedPipe(String url,
int pipeType,
CIFSContext tc)
Open the Named Pipe resource specified by the url
parameter.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getPipeType() |
int |
getType()
Returns type of of object this SmbResource represents.
|
SmbPipeHandle |
openPipe()
Create a pipe handle
|
canRead, canWrite, children, children, children, children, close, connect, copyTo, createNewFile, createTime, delete, equals, exists, fileIndex, getAttributes, getCanonicalPath, getCanonicalUncPath, getContentLength, getContentLengthLong, getContext, getDate, getDfsPath, getDiskFreeSpace, getInputStream, getLastModified, getLocator, getName, getOutputStream, getOwnerGroup, getOwnerGroup, getOwnerUser, getOwnerUser, getParent, getPath, getSecurity, getSecurity, getServer, getServerWithDfs, getShare, getShareSecurity, getTransportContext, getTreeHandle, getUncPath, hashCode, isDirectory, isFile, isHidden, lastAccess, lastModified, length, list, list, listFiles, listFiles, listFiles, listFiles, mkdir, mkdirs, openInputStream, openInputStream, openInputStream, openOutputStream, openOutputStream, openOutputStream, openOutputStream, openRandomAccess, openRandomAccess, renameTo, renameTo, resolve, setAttributes, setCreateTime, setFileTimes, setLastAccess, setLastModified, setReadOnly, setReadWrite, toString, toURL, watchaddRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentType, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCachescanRead, canWrite, children, children, children, children, close, copyTo, createNewFile, createTime, delete, exists, fileIndex, getAttributes, getContext, getDiskFreeSpace, getLocator, getName, getOwnerGroup, getOwnerGroup, getOwnerUser, getOwnerUser, getSecurity, getSecurity, getShareSecurity, isDirectory, isFile, isHidden, lastAccess, lastModified, length, mkdir, mkdirs, openInputStream, openInputStream, openInputStream, openOutputStream, openOutputStream, openOutputStream, openOutputStream, openRandomAccess, openRandomAccess, renameTo, renameTo, resolve, setAttributes, setCreateTime, setFileTimes, setLastAccess, setLastModified, setReadOnly, setReadWrite, watchpublic SmbNamedPipe(String url, int pipeType, boolean unshared, CIFSContext tc) throws MalformedURLException
PIPE_TYPE flags combined with the bitwise OR
operator |. See the examples listed above.url - pipeType - unshared - whether to use an exclusive connection for this pipetc - MalformedURLExceptionpublic SmbNamedPipe(String url, int pipeType, CIFSContext tc) throws MalformedURLException
PIPE_TYPE flags combined with the bitwise OR
operator |. See the examples listed above.url - pipeType - tc - MalformedURLExceptionpublic int getType()
throws SmbException
getType in interface SmbResourcegetType in class SmbFileSmbExceptionSmbFile.getType()public int getPipeType()
getPipeType in interface SmbPipeResourcepublic SmbPipeHandle openPipe()
SmbPipeResourceopenPipe in interface SmbPipeResourceCopyright © 2021. All rights reserved.