Package net.sf.jml.exception

Examples of net.sf.jml.exception.JmlException


                                   DisplayPictureListener listener)
    throws JmlException {
     
      // Check that the MsnObject is not null
      if (displayPicture == null) {
        throw new JmlException();
      }
     
      // Check that the MsnObject is a display picture or an emoticon
      if (displayPicture.getType() != MsnObject.TYPE_DISPLAY_PICTURE &&
        displayPicture.getType() != MsnObject.TYPE_CUSTOM_EMOTICON) {
        throw new JmlException();
      }
     
      // Create a new worker for the MsnObject retrieval
    DisplayPictureRetrieveWorker worker = new DisplayPictureRetrieveWorker(
        this,
View Full Code Here


                                   DisplayPictureListener listener)
    throws JmlException {
     
      // Check that the MsnObject is not null
      if (displayPicture == null) {
        throw new JmlException();
      }
     
      // Check that the MsnObject is a display picture or an emoticon
      if (displayPicture.getType() != MsnObject.TYPE_DISPLAY_PICTURE &&
        displayPicture.getType() != MsnObject.TYPE_CUSTOM_EMOTICON) {
        throw new JmlException();
      }
     
      // Create a new worker for the MsnObject retrieval
    DisplayPictureRetrieveWorker worker = new DisplayPictureRetrieveWorker(
        this,
View Full Code Here

     * @return Instance of the MsnObject.
     * @throws JmlException If an error happens.
     */
    public static MsnObject getInstance(String creator, byte picture[])
    throws JmlException{
        if (creator == null)throw new JmlException(
                "Creator can't null!");
        if (picture == null)throw new JmlException(
                "Picture can't null!");
        return new MsnObject(creator,picture);
    }
View Full Code Here

                    "r");
            pic = new byte[(int) msnObjFile.length()];
            msnObjFile.readFully(pic);
            msnObjFile.close();
        } catch (FileNotFoundException ex) {
            throw new JmlException(
                    "File " + pictureFileName + " not found!",ex);
        } catch (IOException ex) {
            throw new JmlException(
                    "File " + pictureFileName + " can't access!",ex);
        }
        return getInstance(creator,pic);
    }
View Full Code Here

TOP

Related Classes of net.sf.jml.exception.JmlException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.