org.gnu.jcifs
Class PrinterImpl

java.lang.Object
  |
  +--org.gnu.jcifs.SessionImpl
        |
        +--org.gnu.jcifs.PrinterImpl
All Implemented Interfaces:
CifsPrinter, CifsSession

final class PrinterImpl
extends SessionImpl
implements CifsPrinter

CifsPrinter implements the printer operations. CifsPrinter cannot be instantiated directly

Since:
1.0
See Also:
org.gnu.jcifs.CifsServiceManager

Field Summary
static int GRAPHICS_MODE
          No conversion of data should be done by the server
static int TEXT_MODE
          The server may optinally expand tabs to a series of spaces
 
Fields inherited from class org.gnu.jcifs.SessionImpl
CAP_BULK_TRANSFER, CAP_COMPRESSED_DATA, CAP_DFS, CAP_EXTENDED_SECURITY, CAP_LARGE_FILES, CAP_LEVEL_II_OPLOCKS, CAP_LOCK_AND_READ, CAP_MPX_MODE, CAP_NT_FIND, CAP_NT_SMBS, CAP_RAW_MODE, CAP_RPC_REMOTE_APIS, CAP_STATUS32, CAP_UNICODE, fCallerProperties, fCapabilities, fEncryptionKeyLen, fExtendedSecurity, fLoggedAsGuest, fMaxBufferSize, fMaxPendingMPRequests, fMaxRawSize, fMaxVCs, fMsg, fNBTSession, fPID, fProtocol, fSecurityMode, fServerLanMan, fServerOS, fServerPrimaryDomain, fSessionKey, fSessionName, fShare, fSystemTime, fTID, fTimeZone, fUID, LANMAN_1_0, LM_1_2X002, NT_LM_0_12, SMB_CORE, SUPPORTED_DIALECTS
 
Constructor Summary
(package private) PrinterImpl(java.lang.String sessionname, int prot, Share share, NBTSession nbt, SMBMessage packet)
           
 
Method Summary
(package private)  void closePrintFile(int fid)
           
(package private)  int getSortPosition()
           
 CifsPrinterSpoolInfo[] listPrinterSpoolInfo()
          Enumerates the list of the elements currently in the printer queue on the server
 CifsPrintOutputStream openPrintFile(java.lang.String printid, int mode)
          Creates a new print spool file.
 java.lang.String toString()
           
(package private)  void writePrintFile(int fid, byte[] buf, int off, int len)
           
 
Methods inherited from class org.gnu.jcifs.SessionImpl
addSession, allocateSMBMessage, checkConnection, connect, disconnect, echo, enumerateSessions, finalize, getConnectTime, getNetBIOSName, getProperty, getServerAddress, getServerLanMan, getServerOS, getServerPrimaryDomain, getServerTime, getServerTimeZone, getSessionName, getSessions, getShareName, howManyBytesCanWeSend, isConnected, isUserLevelSecurity, lookupSession, negotiate, promptLogin, receiveTransaction, reconnect, removeSession, sendTransaction, sendTransaction2, setAllowAutoReconnection, setProperty, setupSMBMessage, setupSMBMessageSecondary
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gnu.jcifs.CifsSession
disconnect, echo, getConnectTime, getNetBIOSName, getProperty, getServerAddress, getServerLanMan, getServerOS, getServerPrimaryDomain, getServerTime, getServerTimeZone, getSessionName, getShareName, isConnected, isUserLevelSecurity, reconnect, setAllowAutoReconnection, setProperty
 

Field Detail

TEXT_MODE

public static final int TEXT_MODE
The server may optinally expand tabs to a series of spaces

GRAPHICS_MODE

public static final int GRAPHICS_MODE
No conversion of data should be done by the server
Constructor Detail

PrinterImpl

PrinterImpl(java.lang.String sessionname,
            int prot,
            Share share,
            NBTSession nbt,
            SMBMessage packet)
      throws java.io.IOException
Method Detail

listPrinterSpoolInfo

public CifsPrinterSpoolInfo[] listPrinterSpoolInfo()
                                            throws java.io.IOException
Enumerates the list of the elements currently in the printer queue on the server
Specified by:
listPrinterSpoolInfo in interface CifsPrinter
Returns:
CifsPrinterSpoolInfo array

openPrintFile

public CifsPrintOutputStream openPrintFile(java.lang.String printid,
                                           int mode)
                                    throws java.io.IOException
Creates a new print spool file. The setup length is 0.
Specified by:
openPrintFile in interface CifsPrinter
Parameters:
printid - can be used by the server to provide some sort of per-client identifying component to the print file
mode - TEXT_MODE or GRAPHICS_MODE
See Also:
and #GRAPHICS_MODE

closePrintFile

void closePrintFile(int fid)
              throws java.io.IOException

writePrintFile

void writePrintFile(int fid,
                    byte[] buf,
                    int off,
                    int len)
              throws java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSortPosition

int getSortPosition()
Overrides:
getSortPosition in class SessionImpl