public class CoreFile extends SMBFile
Modifier | Constructor and Description |
---|---|
protected |
CoreFile(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.
|
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.
|
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 void Close(SMBDate wrDateTime) throws IOException, SMBException
Close
in class SMBFile
wrDateTime
- Set the last write date/time, or null to let the server set the date/timeIOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic void Flush() throws IOException, SMBException
Flush
in class SMBFile
IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic int Read(byte[] buf, int siz, int offset) throws 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.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic int Write(byte[] buf, int siz, int offset) throws 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.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic long Seek(long pos, int typ) throws IOException, SMBException
Seek
in class SMBFile
pos
- Relative offsettyp
- Seek type (@see org.alfresco.jlan.smb.SeekType)IOException
SMBException
- If an SMB level error occurspublic void Lock(long offset, long len) throws IOException, SMBException
Lock
in class SMBFile
offset
- Offset within the file to start locklen
- Number of bytes to lockIOException
SMBException
- If an SMB level error occurspublic void Unlock(long offset, long len) throws IOException, SMBException
Unlock
in class SMBFile
offset
- Offset within the file to unlocklen
- Number of bytes to unlockIOException
SMBException
- If an SMB level error occursCopyright © 2005–2017 Alfresco Software. All rights reserved.