public final class DataPipeFile extends SMBFile
An SMB file provides read and/or write access to a remote named pipe.
Modifier and Type | Field and Description |
---|---|
static int |
NoTimeout |
Modifier | Constructor and Description |
---|---|
protected |
DataPipeFile(Session sess,
FileInfo finfo,
int fid)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
Close(SMBDate wrDateTime)
Close the remote file.
|
void |
Flush()
Flush data to the remote file.
|
protected boolean |
isNTDialect()
Check if NT dialect SMBs should be used
|
boolean |
isPipeBroken()
Check if the pipe is broken
|
void |
Lock(long offset,
long len)
Lock a range of bytes within the file
|
int |
Read(byte[] buf,
int siz,
int offset)
Read a block of data from the file.
|
int |
Read(byte[] buf,
int siz,
int offset,
int minSiz)
Read a block of data from the file.
|
long |
Seek(long pos,
int typ)
Seek to the specified point in the file.
|
void |
Unlock(long offset,
long len)
Unlock a range of bytes within the file
|
int |
Write(byte[] buf,
int siz,
int offset)
Write a block of data to the file.
|
asInputStream, asOutputStream, atEndOfFile, Available, clearEndOfFile, Close, finalize, getAttributes, getFileId, getFileName, getFilePath, getFileSize, getReadPosition, getSession, getWritePosition, hasStateFlag, isClosed, isDirectory, isHidden, isReadOnly, isSystem, Read, refreshFileInformation, setFileInformation, setStateFlag, toString, Write, Write
public static final int NoTimeout
public final void Close(SMBDate wrDateTime) throws java.io.IOException, SMBException
Close
in class SMBFile
wrDateTime
- Set the last write date/time, or null to let the server set the date/timejava.io.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic final void Flush() throws java.io.IOException, SMBException
Flush
in class SMBFile
java.io.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic final int Read(byte[] buf, int siz, int offset) throws java.io.IOException, SMBException
Read
in class SMBFile
buf
- Byte buffer to receive the data.siz
- Maximum length of data to receive.offset
- Offset within buffer to place received data.java.io.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic final int Read(byte[] buf, int siz, int offset, int minSiz) throws java.io.IOException, SMBException
buf
- Byte buffer to receive the data.siz
- Maximum length of data to receive.offset
- Offset within buffer to place received data.minSiz
- Minimum read size, zero will return immediately if there is no datajava.io.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic final int Write(byte[] buf, int siz, int offset) throws java.io.IOException, SMBException
Write
in class SMBFile
buf
- Byte buffer containing data to be written.siz
- Length of data to be written.offset
- Offset within buffer to start writing data from.java.io.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic long Seek(long pos, int typ) throws java.io.IOException, SMBException
Seek
in class SMBFile
pos
- Relative offsettyp
- Seek type (@see org.alfresco.jlan.smb.SeekType)java.io.IOException
SMBException
- If an SMB level error occurspublic void Lock(long offset, long len) throws java.io.IOException, SMBException
Lock
in class SMBFile
offset
- Offset within the file to start locklen
- Number of bytes to lockjava.io.IOException
SMBException
- If an SMB level error occurspublic void Unlock(long offset, long len) throws java.io.IOException, SMBException
Unlock
in class SMBFile
offset
- Offset within the file to unlocklen
- Number of bytes to unlockjava.io.IOException
SMBException
- If an SMB level error occursprotected final boolean isNTDialect()
public final boolean isPipeBroken()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.