Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Licensed to the Apache Software Foundation (ASF) under one or more
    * contributor license agreements.  See the NOTICE file distributed with
    * this work for additional information regarding copyright ownership.
    * The ASF licenses this file to You under the Apache License, Version 2.0
    * (the "License"); you may not use this file except in compliance with
    * the License.  You may obtain a copy of the License at
    *
    *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.apache.commons.net.telnet;
  
  import java.util.Arrays;
  

Author(s):
Bruno D'Avanzo
  
  
  class Telnet extends SocketClient
  {
      static final boolean debug =  /*true;*/ false;
  
      static final boolean debugoptions =  /*true;*/ false;
  
      static final byte[] _COMMAND_DO = {
                                            (byte)., (byte).
                                        };
  
      static final byte[] _COMMAND_DONT = {
                                              (byte)., (byte).
                                          };
  
      static final byte[] _COMMAND_WILL = {
                                              (byte)., (byte).
                                          };
  
      static final byte[] _COMMAND_WONT = {
                                              (byte)., (byte).
                                          };
  
      static final byte[] _COMMAND_SB = {
                                            (byte)., (byte).
                                        };
  
      static final byte[] _COMMAND_SE = {
                                            (byte)., (byte).
                                        };
  
      static final int _WILL_MASK = 0x01, _DO_MASK = 0x02,
                                    _REQUESTED_WILL_MASK = 0x04, _REQUESTED_DO_MASK = 0x08;
  
      /* public */
      static final int DEFAULT_PORT =  23;
  
      int[] _doResponse_willResponse_options;
  
      /* TERMINAL-TYPE option (start)*/
    
Terminal type option
  
      protected static final int TERMINAL_TYPE = 24;

    
Send (for subnegotiation)
  
      protected static final int TERMINAL_TYPE_SEND =  1;

    
Is (for subnegotiation)
  
      protected static final int TERMINAL_TYPE_IS =  0;

    
Is sequence (for subnegotiation)
  
      static final byte[] _COMMAND_IS = {
                                            (byte, (byte
                                        };

    
Terminal type
  
      private String terminalType = null;
      /* TERMINAL-TYPE option (end)*/
  
      /* open TelnetOptionHandler functionality (start)*/
    
Array of option handlers
 
     private final TelnetOptionHandler optionHandlers[];
 
     /* open TelnetOptionHandler functionality (end)*/
 
     /* Code Section added for supporting AYT (start)*/
    
AYT sequence
 
     static final byte[] _COMMAND_AYT = {
                                           (byte., (byte.
                                        };

    
monitor to wait for AYT
 
     private final Object aytMonitor = new Object();

    
flag for AYT
 
     private volatile boolean aytFlag = true;
     /* Code Section added for supporting AYT (end)*/

    
The stream on which to spy
 
     private volatile OutputStream spyStream = null;

    
The notification handler
 
     private TelnetNotificationHandler __notifhand = null;
    
Empty Constructor
 
     Telnet()
     {
         setDefaultPort();
          = new int[. + 1];
          = new int[. + 1];
          = new int[. + 1];
          =
             new TelnetOptionHandler[. + 1];
     }
 
     /* TERMINAL-TYPE option (start)*/
    
This constructor lets you specify the terminal type.

Parameters:
termtype - terminal type to be negotiated (ej. VT100)
 
     Telnet(String termtype)
     {
         setDefaultPort();
          = new int[. + 1];
          = new int[. + 1];
          = new int[. + 1];
          = termtype;
          =
             new TelnetOptionHandler[. + 1];
     }
     /* TERMINAL-TYPE option (end)*/

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a will has been acknowledged

 
     boolean _stateIsWill(int option)
     {
         return (([option] & ) != 0);
     }

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a wont has been acknowledged

 
     boolean _stateIsWont(int option)
     {
         return !_stateIsWill(option);
     }

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a do has been acknowledged

 
     boolean _stateIsDo(int option)
     {
         return (([option] & ) != 0);
     }

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a dont has been acknowledged

 
     boolean _stateIsDont(int option)
     {
         return !_stateIsDo(option);
     }

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a will has been reuqested

 
     boolean _requestedWill(int option)
     {
         return (([option] & ) != 0);
     }

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a wont has been reuqested

 
     boolean _requestedWont(int option)
     {
         return !_requestedWill(option);
     }

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a do has been reuqested

 
     boolean _requestedDo(int option)
     {
         return (([option] & ) != 0);
     }

    
Looks for the state of the option.

Parameters:
option - option code to be looked up.
Returns:
returns true if a dont has been reuqested

 
     boolean _requestedDont(int option)
     {
         return !_requestedDo(option);
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
Throws:
java.io.IOException
 
     void _setWill(int optionthrows IOException
     {
         [option] |= ;
 
         /* open TelnetOptionHandler functionality (start)*/
         if (_requestedWill(option))
         {
             if ([option] != null)
             {
                 [option].setWill(true);
 
                 int subneg[] =
                     [option].startSubnegotiationLocal();
 
                 if (subneg != null)
                 {
                     _sendSubnegotiation(subneg);
                 }
             }
         }
         /* open TelnetOptionHandler functionality (end)*/
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
Throws:
java.io.IOException
 
     void _setDo(int optionthrows IOException
     {
         [option] |= ;
 
         /* open TelnetOptionHandler functionality (start)*/
         if (_requestedDo(option))
         {
             if ([option] != null)
             {
                 [option].setDo(true);
 
                 int subneg[] =
                     [option].startSubnegotiationRemote();
 
                 if (subneg != null)
                 {
                     _sendSubnegotiation(subneg);
                 }
             }
         }
         /* open TelnetOptionHandler functionality (end)*/
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
 
     void _setWantWill(int option)
     {
         [option] |= ;
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
 
     void _setWantDo(int option)
     {
         [option] |= ;
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
 
     void _setWont(int option)
     {
         [option] &= ~;
 
         /* open TelnetOptionHandler functionality (start)*/
         if ([option] != null)
         {
             [option].setWill(false);
         }
         /* open TelnetOptionHandler functionality (end)*/
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
 
     void _setDont(int option)
     {
         [option] &= ~;
 
         /* open TelnetOptionHandler functionality (start)*/
         if ([option] != null)
         {
             [option].setDo(false);
         }
         /* open TelnetOptionHandler functionality (end)*/
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
 
     void _setWantWont(int option)
     {
         [option] &= ~;
     }

    
Sets the state of the option.

Parameters:
option - option code to be set.
 
     void _setWantDont(int option)
     {
         [option] &= ~;
     }

    
Processes a COMMAND.

Parameters:
command - option code to be set.
 
     void _processCommand(int command)
     {
         if ()
         {
             ..println("RECEIVED COMMAND: " + command);
         }
 
         if ( != null)
         {
             .receivedNegotiation(
                 .command);
         }
     }

    
Processes a DO request.

Parameters:
option - option code to be set.
Throws:
java.io.IOException - Exception in I/O.
 
     void _processDo(int optionthrows IOException
     {
         if ()
         {
             ..println("RECEIVED DO: "
                 + TelnetOption.getOption(option));
         }
 
         if ( != null)
         {
             .receivedNegotiation(
                 .,
                 option);
         }
 
         boolean acceptNewState = false;
 
 
         /* open TelnetOptionHandler functionality (start)*/
         if ([option] != null)
         {
             acceptNewState = [option].getAcceptLocal();
         }
         else
         {
         /* open TelnetOptionHandler functionality (end)*/
             /* TERMINAL-TYPE option (start)*/
             if (option == )
             {
                 if (( != null) && (.length() > 0))
                 {
                     acceptNewState = true;
                 }
             }
             /* TERMINAL-TYPE option (end)*/
         /* open TelnetOptionHandler functionality (start)*/
         }
         /* open TelnetOptionHandler functionality (end)*/
 
         if ([option] > 0)
         {
             --[option];
             if ([option] > 0 && _stateIsWill(option))
             {
                 --[option];
             }
         }
 
         if ([option] == 0)
         {
             if (_requestedWont(option))
             {
 
                 switch (option)
                 {
 
                 default:
                     break;
 
                 }
 
 
                 if (acceptNewState)
                 {
                     _setWantWill(option);
                     _sendWill(option);
                 }
                 else
                 {
                     ++[option];
                     _sendWont(option);
                 }
             }
             else
             {
                 // Other end has acknowledged option.
 
                 switch (option)
                 {
 
                 default:
                     break;
 
                 }
 
             }
         }
 
         _setWill(option);
     }

    
Processes a DONT request.

Parameters:
option - option code to be set.
Throws:
java.io.IOException - Exception in I/O.
 
     void _processDont(int optionthrows IOException
     {
         if ()
         {
             ..println("RECEIVED DONT: "
                 + TelnetOption.getOption(option));
         }
         if ( != null)
         {
             .receivedNegotiation(
                 .,
                 option);
         }
         if ([option] > 0)
         {
             --[option];
             if ([option] > 0 && _stateIsWont(option))
             {
                 --[option];
             }
         }
 
         if ([option] == 0 && _requestedWill(option))
         {
 
             switch (option)
             {
 
             default:
                 break;
 
             }
 
             /* FIX for a BUG in the negotiation (start)*/
             if ((_stateIsWill(option)) || (_requestedWill(option)))
             {
                 _sendWont(option);
             }
 
             _setWantWont(option);
             /* FIX for a BUG in the negotiation (end)*/
         }
 
         _setWont(option);
     }


    
Processes a WILL request.

Parameters:
option - option code to be set.
Throws:
java.io.IOException - Exception in I/O.
 
     void _processWill(int optionthrows IOException
     {
         if ()
         {
             ..println("RECEIVED WILL: "
                 + TelnetOption.getOption(option));
         }
 
         if ( != null)
         {
             .receivedNegotiation(
                 .,
                 option);
         }
 
         boolean acceptNewState = false;
 
         /* open TelnetOptionHandler functionality (start)*/
         if ([option] != null)
         {
             acceptNewState = [option].getAcceptRemote();
         }
         /* open TelnetOptionHandler functionality (end)*/
 
         if ([option] > 0)
         {
             --[option];
             if ([option] > 0 && _stateIsDo(option))
             {
                 --[option];
             }
         }
 
         if ([option] == 0 && _requestedDont(option))
         {
 
             switch (option)
             {
 
             default:
                 break;
 
             }
 
 
             if (acceptNewState)
             {
                 _setWantDo(option);
                 _sendDo(option);
             }
             else
             {
                 ++[option];
                 _sendDont(option);
             }
         }
 
         _setDo(option);
     }

    
Processes a WONT request.

Parameters:
option - option code to be set.
Throws:
java.io.IOException - Exception in I/O.
 
     void _processWont(int optionthrows IOException
     {
         if ()
         {
             ..println("RECEIVED WONT: "
                 + TelnetOption.getOption(option));
         }
 
         if ( != null)
         {
             .receivedNegotiation(
                 .,
                 option);
         }
 
         if ([option] > 0)
         {
             --[option];
             if ([option] > 0 && _stateIsDont(option))
             {
                 --[option];
             }
         }
 
         if ([option] == 0 && _requestedDo(option))
         {
 
             switch (option)
             {
 
             default:
                 break;
 
             }
 
             /* FIX for a BUG in the negotiation (start)*/
             if ((_stateIsDo(option)) || (_requestedDo(option)))
             {
                 _sendDont(option);
             }
 
             _setWantDont(option);
             /* FIX for a BUG in the negotiation (end)*/
         }
 
         _setDont(option);
     }
 
     /* TERMINAL-TYPE option (start)*/
    
Processes a suboption negotiation.

Parameters:
suboption - subnegotiation data received
suboptionLength - length of data received
Throws:
java.io.IOException - Exception in I/O.
 
     void _processSuboption(int suboption[], int suboptionLength)
     throws IOException
     {
         if ()
         {
             ..println("PROCESS SUBOPTION.");
         }
 
         /* open TelnetOptionHandler functionality (start)*/
         if (suboptionLength > 0)
         {
             if ([suboption[0]] != null)
             {
                 int responseSuboption[] =
                   [suboption[0]].answerSubnegotiation(suboption,
                   suboptionLength);
                 _sendSubnegotiation(responseSuboption);
             }
             else
             {
                 if (suboptionLength > 1)
                 {
                     if ()
                     {
                         for (int ii = 0; ii < suboptionLengthii++)
                         {
                             ..println("SUB[" + ii + "]: "
                                 + suboption[ii]);
                         }
                     }
                     if ((suboption[0] == )
                         && (suboption[1] == ))
                     {
                         _sendTerminalType();
                     }
                 }
             }
         }
         /* open TelnetOptionHandler functionality (end)*/
     }

    
Sends terminal type information.

Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _sendTerminalType()
     throws IOException
     {
         if ()
         {
             ..println("SEND TERMINAL-TYPE: " + );
         }
         if ( != null)
         {
             .write();
             .write();
             .write(.getBytes(getCharsetName())); // Java 1.6 can use getCharset()
             .write();
             .flush();
         }
     }
 
     /* TERMINAL-TYPE option (end)*/
 
     /* open TelnetOptionHandler functionality (start)*/
    
Manages subnegotiation for Terminal Type.

Parameters:
subn - subnegotiation data to be sent
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _sendSubnegotiation(int subn[])
     throws IOException
     {
         if ()
         {
             ..println("SEND SUBNEGOTIATION: ");
             if (subn != null)
             {
                 ..println(Arrays.toString(subn));
             }
         }
         if (subn != null)
         {
             .write();
             // Note _output_ is buffered, so might as well simplify by writing single bytes
             for (int element : subn)
             {
                 byte b = (byteelement;
                 if (b == (byte.) { // cast is necessary because IAC is outside the signed byte range
                     .write(b); // double any IAC bytes
                 }
                 .write(b);
             }
             .write();
 
             /* Code Section added for sending the negotiation ASAP (start)*/
             .flush();
             /* Code Section added for sending the negotiation ASAP (end)*/
         }
     }
     /* open TelnetOptionHandler functionality (end)*/

    
Sends a command, automatically adds IAC prefix and flushes the output.

Parameters:
cmd - command data to be sent
Throws:
java.io.IOException - Exception in I/O.
Since:
3.0
 
     final synchronized void _sendCommand(byte cmdthrows IOException
     {
             .write(.);
             .write(cmd);
             .flush();
     }
 
     /* Code Section added for supporting AYT (start)*/
    
Processes the response of an AYT
 
     final synchronized void _processAYTResponse()
     {
         if (!)
         {
             synchronized ()
             {
                  = true;
                 .notifyAll();
             }
         }
     }
     /* Code Section added for supporting AYT (end)*/

    
Called upon connection.

Throws:
java.io.IOException - Exception in I/O.
 
     @Override
     protected void _connectAction_() throws IOException
     {
         /* (start). BUGFIX: clean the option info for each connection*/
         for (int ii = 0; ii < . + 1; ii++)
         {
             [ii] = 0;
             [ii] = 0;
             [ii] = 0;
             if ([ii] != null)
             {
                 [ii].setDo(false);
                 [ii].setWill(false);
             }
         }
         /* (end). BUGFIX: clean the option info for each connection*/
 
         super._connectAction_();
          = new BufferedInputStream();
          = new BufferedOutputStream();
 
         /* open TelnetOptionHandler functionality (start)*/
         for (int ii = 0; ii < . + 1; ii++)
         {
             if ([ii] != null)
             {
                 if ([ii].getInitLocal())
                 {
                     _requestWill([ii].getOptionCode());
                 }
 
                 if ([ii].getInitRemote())
                 {
                     _requestDo([ii].getOptionCode());
                 }
             }
         }
         /* open TelnetOptionHandler functionality (end)*/
     }

    
Sends a DO.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _sendDo(int option)
     throws IOException
     {
         if ( || )
         {
             ..println("DO: " + TelnetOption.getOption(option));
         }
         .write();
         .write(option);
 
         /* Code Section added for sending the negotiation ASAP (start)*/
         .flush();
         /* Code Section added for sending the negotiation ASAP (end)*/
     }

    
Requests a DO.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _requestDo(int option)
     throws IOException
     {
         if (([option] == 0 && _stateIsDo(option))
             || _requestedDo(option))
         {
             return ;
         }
         _setWantDo(option);
         ++[option];
         _sendDo(option);
     }

    
Sends a DONT.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _sendDont(int option)
     throws IOException
     {
         if ( || )
         {
             ..println("DONT: " + TelnetOption.getOption(option));
         }
         .write();
         .write(option);
 
         /* Code Section added for sending the negotiation ASAP (start)*/
         .flush();
         /* Code Section added for sending the negotiation ASAP (end)*/
     }

    
Requests a DONT.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _requestDont(int option)
     throws IOException
     {
         if (([option] == 0 && _stateIsDont(option))
             || _requestedDont(option))
         {
             return ;
         }
         _setWantDont(option);
         ++[option];
         _sendDont(option);
     }


    
Sends a WILL.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _sendWill(int option)
     throws IOException
     {
         if ( || )
         {
             ..println("WILL: " + TelnetOption.getOption(option));
         }
         .write();
         .write(option);
 
         /* Code Section added for sending the negotiation ASAP (start)*/
         .flush();
         /* Code Section added for sending the negotiation ASAP (end)*/
     }

    
Requests a WILL.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _requestWill(int option)
     throws IOException
     {
         if (([option] == 0 && _stateIsWill(option))
             || _requestedWill(option))
         {
             return ;
         }
         _setWantWill(option);
         ++[option];
         _sendWill(option);
     }

    
Sends a WONT.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
 
     final synchronized void _sendWont(int option)
     throws IOException
    {
        if ( || )
        {
            ..println("WONT: " + TelnetOption.getOption(option));
        }
        .write();
        .write(option);
        /* Code Section added for sending the negotiation ASAP (start)*/
        .flush();
        /* Code Section added for sending the negotiation ASAP (end)*/
    }

    
Requests a WONT.

Parameters:
option - Option code.
Throws:
java.io.IOException - Exception in I/O.
    final synchronized void _requestWont(int option)
    throws IOException
    {
        if (([option] == 0 && _stateIsWont(option))
            || _requestedWont(option))
        {
            return ;
        }
        _setWantWont(option);
        ++[option];
        _sendWont(option);
    }

    
Sends a byte.

Parameters:
b - byte to send
Throws:
java.io.IOException - Exception in I/O.
    final synchronized void _sendByte(int b)
    throws IOException
    {
        .write(b);
        /* Code Section added for supporting spystreams (start)*/
        _spyWrite(b);
        /* Code Section added for supporting spystreams (end)*/
    }
    /* Code Section added for supporting AYT (start)*/
    
Sends an Are You There sequence and waits for the result.

Parameters:
timeout - Time to wait for a response (millis.)
Returns:
true if AYT received a response, false otherwise
Throws:
java.io.IOException - Exception in I/O.
java.lang.IllegalArgumentException - Illegal argument
java.lang.InterruptedException - Interrupted during wait.
    final boolean _sendAYT(long timeout)
    {
        boolean retValue = false;
        synchronized ()
        {
            synchronized (this)
            {
                 = false;
                .write();
                .flush();
            }
            .wait(timeout);
            if ( == false)
            {
                retValue = false;
                 = true;
            }
            else
            {
                retValue = true;
            }
        }
        return (retValue);
    }
    /* Code Section added for supporting AYT (end)*/
    /* open TelnetOptionHandler functionality (start)*/

    
Registers a new TelnetOptionHandler for this telnet to use.

Parameters:
opthand - option handler to be registered.
Throws:
InvalidTelnetOptionException - The option code is invalid.
java.io.IOException
    {
        int optcode = opthand.getOptionCode();
        if (TelnetOption.isValidOption(optcode))
        {
            if ([optcode] == null)
            {
                [optcode] = opthand;
                if (isConnected())
                {
                    if (opthand.getInitLocal())
                    {
                        _requestWill(optcode);
                    }
                    if (opthand.getInitRemote())
                    {
                        _requestDo(optcode);
                    }
                }
            }
            else
            {
                throw (new InvalidTelnetOptionException(
                    "Already registered option"optcode));
            }
        }
        else
        {
            throw (new InvalidTelnetOptionException(
                "Invalid Option Code"optcode));
        }
    }

    
Unregisters a TelnetOptionHandler.

Parameters:
optcode - Code of the option to be unregistered.
Throws:
InvalidTelnetOptionException - The option code is invalid.
java.io.IOException
    void deleteOptionHandler(int optcode)
    {
        if (TelnetOption.isValidOption(optcode))
        {
            if ([optcode] == null)
            {
                throw (new InvalidTelnetOptionException(
                    "Unregistered option"optcode));
            }
            else
            {
                TelnetOptionHandler opthand = [optcode];
                [optcode] = null;
                if (opthand.getWill())
                {
                    _requestWont(optcode);
                }
                if (opthand.getDo())
                {
                    _requestDont(optcode);
                }
            }
        }
        else
        {
            throw (new InvalidTelnetOptionException(
                "Invalid Option Code"optcode));
        }
    }
    /* open TelnetOptionHandler functionality (end)*/
    /* Code Section added for supporting spystreams (start)*/
    
Registers an OutputStream for spying what's going on in the Telnet session.

Parameters:
spystream - OutputStream on which session activity will be echoed.
    void _registerSpyStream(OutputStream  spystream)
    {
         = spystream;
    }

    
Stops spying this Telnet.

    void _stopSpyStream()
    {
         = null;
    }

    
Sends a read char on the spy stream.

Parameters:
ch - character read from the session
    void _spyRead(int ch)
    {
        OutputStream spy = ;
        if (spy != null)
        {
            try
            {
                if (ch != '\r')
                {
                    spy.write(ch);
                    if (ch == '\n')
                    {
                        spy.write('\r');
                    }
                    spy.flush();
                }
            }
            catch (IOException e)
            {
                 = null;
            }
        }
    }

    
Sends a written char on the spy stream.

Parameters:
ch - character written to the session
    void _spyWrite(int ch)
    {
        if (!(_stateIsDo(.)
            && _requestedDo(.)))
        {
            OutputStream spy = ;
            if (spy != null)
            {
                try
                {
                    spy.write(ch);
                    spy.flush();
                }
                catch (IOException e)
                {
                     = null;
                }
            }
        }
    }
    /* Code Section added for supporting spystreams (end)*/

    
Registers a notification handler to which will be sent notifications of received telnet option negotiation commands.

Parameters:
notifhand - TelnetNotificationHandler to be registered
    public void registerNotifHandler(TelnetNotificationHandler  notifhand)
    {
         = notifhand;
    }

    
Unregisters the current notification handler.

    public void unregisterNotifHandler()
    {
         = null;
    }
New to GrepCode? Check out our FAQ X