Create MIME Object with String

Hello,
I have a string value containing a MIME message. What I want to do now is to parse the date out of this message. My idea was to create a MIME object type first and then using some getter methods to parse the DATE of the MIME header.
So basically the question is how I create a MIME object out of the string. Any idea on this?
Thank you very much.

Hi again Florian,
Maybe a glance at those pages could help you :
http://jigsaw.w3.org/Doc/Programmer/api/index.html?org/w3c/www/mime/MimeParser.html
http://docs.sun.com/source/816-6028-10/asd3j.htm#1047313
http://james.apache.org/mime4j/apidocs/index.html?org/apache/james/mime4j/parser/MimeStreamParser.html
Not sure those classes could be easily used and imported into XI/PI, but if you can avoid writing your own parser, that'd be great
Chris

Similar Messages

  • Create an object with the name passed in as a string argument to a method

    Hi,
    I am sorry if it's too trivial for this forum , but I am stuck with the following requirements.
    I have a method
    void abc(String object_name, String key, String value)
    method abc should first check if there exists in memory a hashmap object with the name passed in as argument object_name.
    If yes ..just put the key and value there.
    if not , then create the hashmap object called <object_name> and insert the key/value there.
    Can anybody help me in the first step i.e, how to check if an object exists with the name passed in and if not then create it.
    Will getInstance method be of any help?
    Thanks in advance for your response.
    -Sub-java

    Dear Cotton.m,
    Thanks for your suggesstion. I will remember that.
    But somehow I have a strong belief that you still need to consult dictionary for exact meaning of the words like "upset" , "frustration" etc. Not knowing something in a language , that too as a beginner, does not yield frustration, but increases curiosity. And people like petes1234 are there to diminish that appetite.
    To clarify above, let me compare jverd's reply to my doubt with petes1234's.
    jverd said it cannot be done and suggested a work around (It was perfect and worked for me) While petes1234 , having no work in hand probably, started analysis of newbies mistakes.
    jverd solved my problem by saying that it cannot be done. petes1234 acted as a worthless critic in my opinion and now joined cotton.m.
    Finally, this is a java forum and I do not want to discuss human characteristics here for sure.
    My apologies if I had a wrong concept or if I chose a wrong forum to ask, where people like petes1234 or Cotton.m show their geekdom by pointing out "shortfalls" rather than clearing that by perfect examples and words.
    Again take it easy and Cotton.m , please do not use this forum to figure out others' frustration but be a little more focussed on solving others "Java related" problems :)
    -Sub-java

  • Creating Objects with String name

    How can i create an object, but just having the name as String?
    Like, instead of creating like JInternalFrame obj = new MyInternalFrame(), do it like JInternalFrame obj = createObject("MyInternalFrame") ( i just gave createObject as example, ignore it)...
    Does anyone knows how to do it? Because i have several windows, and by clicking, i dont want to be with a lot of if clauses checking each one to se wich one is the ritgh class to call...
    Tks,
    Bruno

    You need the Class class in package java.lang, specifically class (static) method forName() and instance method newInstance():
    JInternalFrame obj =
        (JInternalFrame) Class.forName("MyInternalFrame").newInstance();

  • Error when create XMLType object with JDBC connection

    Hello, I try to get an XMLType object with JDBC, but it doesn't work. Can somebody help me?
    My code is :
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@"+"a02w03:1521:PROJET", "scott", "tiger");
    OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement("select xmldoc from cv_col");
    ResultSet rset = stmt.executeQuery();
    OracleResultSet orset = (OracleResultSet) rset;
    while(orset.next())
    OPAQUE o = orset.getOPAQUE(1);
    System.out.println(o.getSQLTypeName());
    XMLType poxml = XMLType.createXML(o);
    My database table:
    CREATE TABLE cv_col (
    XMLDoc xmltype
    Execution: The SQL type name "SYS.XMLTYPE" is write and then I obtain the error:
    Exception in thread main
    java.lang.NoSuchMethodError: java.lang.String oracle.jdbc.internal.OracleConnection.getProtocolType()
         at oracle.xdb.XMLType.initConn(XMLType.java:2072)
         at oracle.xdb.XMLType.<init>(XMLType.java:903)
         at oracle.xdb.XMLType.createXML(XMLType.java:493)
         at Prog.main(Prog.java:26)
    Process exited with exit code 1.
    Thank you, very much!

    What platform are you using for the database, what are you running your code on.
    Which database version are you working with.. What is your class path. What version of JDBC and OCI are in the client environment, eg what are CLASSPATH and PATH / LD_LIBRARY_PATH settings. Have you tested your code using a simple IDE like Oracle's JDeveloper or run it from directly from the command line.

  • How to avoid Multiple download of Mime Objects with cleared Cache

    Hii!!
    When using IC we client and when we are searching for the CSR multiple Mime Objects are getting Downloaded ..Can anybody tell me exactly in which class or function module these mime objects are getting downloaded or where  the URL of the same is getting generated?

    I think I've figure out what is happening here. Previous post didn't descript the situation quite clear, it is acturally like this:
    // previous code:
    var container:Sprite = new Sprite();
    var bitmapCantainer:Sprite = new Sprite();
    bitmapCantainer.addChild(bitmapCache);
    bitmapCantainer.mouseEnabled = false;
    bitmapCantainer.mouseChildren = false;
    container.addChild(bitmapCantainer);
    container.hitArea = someSpriteMadeUp;
    // it turns out there'is a parent container of the "container" sprite I created
    // and I disable that
    parentContainer.mouseEnabled = false;
    So now I don't need to avoid any interaction of transparent part of bitmap with mouse evnets, JUST set mouseEnabled property to false of the parent display object which is in the same depth of display list of which those display objects you don't what be "covered" are in.

  • Create lock object with fun command

    Hallo,
    Is it possible to create a lock object with the fun command? I tried to use:
    FUN ( ENQUEUE _<lockobject> , <interface> ).
    When I fill the importing parameters, execute the script and afterwards refresh the interace than the import parameters are empty. Is there a way to create a lock object with the fun command or at least with inline abap?
    regards,
    Wolfgang

    Hi Wolfgang,
    in general your way of including the FUN command was correct.
    The loss of import parameter values must have been caused by some other reason, not related to the invoke of enqueue. Maybe try it again.
    If, for any reason, using FUN is not possible, it's always an alternative to use ABAP. .... ENDABAP. with correct ABAP coding inbetween (e.g. CALL FUNCTION ...).
    Nevertheless regarding enqueue you need to consider, that the lock you set by running eCATT test scripts in this way, will last (only) as long as the session in which the function was called is active. Means, it lasts as long as you do not close the SECATT transaction (/n or similar) and not use commands like RESCON in your test script. Check your locks with transaction sm12.
    Be aware, that interfering with an applications lock handling and strategy might also harm running transactions or the data processed by this transactions. Usually there is no need to call the enqueue modules from a test.
    Best Regards
    Jens

  • How to create C201 object with BAPI in ECC6.0

    BAPI_ROUTING_CREATE can not create C201 object.Because its plnty is always set to 'N'.In C201, the plnty should be '2'

    Write a method
    public void MsgBox(String ex, Page pg,Object obj)
    string s = "<SCRIPT language='javascript'>alert('" + ex.Replace("\r\n", "\\n").Replace("'", "") + "'); </SCRIPT>";
    Type cstype = obj.GetType();
    ClientScriptManager cs = pg.ClientScript;
    cs.RegisterClientScriptBlock(cstype, s, s.ToString());
    and when you would like to use messagebox just use this line
    MsgBox("your message", this.Page, this);

  • Error during create business object with XACML schema

    Hi
    I can't create a policyset business object with access_control-xacml-2.0-policy-schema-cd-04.xsd schema file in Jdeveloper 11.1.1.3 with bpm11g extension.
    it raise bellow error message.
    you can find the schema file from bellow link.
    http://www.oasis-open.org/committees/download.php/10577/XACML-2.0-CD-ALL.zip
    after download the zip file ,you only need the access_control-xacml-2.0-policy-schema-cd-04.xsd file,
    start Jdeveloper in debug mode(run jdev in console), import xsd file to bpm project, and create the business object, then
    you will got bellow error message.
    Does any one know how to solve it?
    Thanks.
    ----------------error message from jdeveloper debug console-------------------------
    Exception occurred during event dispatching:
    oracle.bpm.project.catalog.type.TypeLoadRuntimeException: BPM-71530: Unexpected error when loading resource '/xsd/access
    _control-xacml-2.0-policy-schema-cd-04.xsd'.  Cause: The specified resource could not be loaded.  Action: Check logs for
    more detail
    at oracle.bpm.project.catalog.loaders.AbstractTypeLoader.buildTypes(AbstractTypeLoader.java:153)
    at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.buildType(ProjectCatalogComponentBundle.java
    :565)
    at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.buildTypeTree(ProjectCatalogComponentBundle.
    java:547)
    at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.loadTypeNames(ProjectCatalogComponentBundle.
    java:128)
    at oracle.bpm.type.TypeCache.reloadFromBundle(TypeCache.java:619)
    at oracle.bpm.type.TypeCache.reload(TypeCache.java:116)
    at oracle.bpm.type.TypeCache.sync(TypeCache.java:152)
    at oracle.bpm.type.DefaultComponentCatalog.sync(DefaultComponentCatalog.java:524)
    at oracle.bpm.fusion.soa.soabrowser.SOASchemaBrowserDialogImpl.showDialog(SOASchemaBrowserDialogImpl.java:72)
    at oracle.bpm.designer.ObjectContainerDialog.browseSOASchema(ObjectContainerDialog.java:401)
    at oracle.bpm.designer.ObjectContainerDialog.access$300(ObjectContainerDialog.java:67)
    at oracle.bpm.designer.ObjectContainerDialog$7.actionPerformed(ObjectContainerDialog.java:572)
    at oracle.bpm.ui.peer.swing.event.SwingActionListener.actionPerformed(SwingActionListener.java:30)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6267)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
    at java.awt.Dialog$1.run(Dialog.java:1046)
    at java.awt.Dialog$3.run(Dialog.java:1098)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1096)
    at java.awt.Component.show(Component.java:1563)
    at java.awt.Component.setVisible(Component.java:1515)
    at java.awt.Window.setVisible(Window.java:842)
    at java.awt.Dialog.setVisible(Dialog.java:986)
    at oracle.bpm.ui.peer.swing.SwingComponent.setVisible(SwingComponent.java:395)
    at oracle.bpm.ui.UiComponent.setVisible(UiComponent.java:838)
    at oracle.bpm.ui.OkCancelDialog.setVisible(OkCancelDialog.java:176)
    at oracle.bpm.designer.action.NewBpmObjectAction.newFuegoObject(NewBpmObjectAction.java:127)
    at oracle.bpm.designer.action.NewBpmObjectAction.doIt(NewBpmObjectAction.java:67)
    at oracle.bpm.designer.DesignerAction.run(DesignerAction.java:71)
    at oracle.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:297)
    at oracle.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:290)
    at oracle.bpm.fusion.ui.action.IdeMenuAdapter$1.handleEvent(IdeMenuAdapter.java:135)
    at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
    at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
    at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
    at java.awt.Component.processMouseEvent(Component.java:6267)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.NullPointerException
    at oracle.bpm.project.catalog.parser.xsd.ElementRootDef.buildType(ElementRootDef.java:88)
    at oracle.bpm.project.catalog.parser.xsd.SchemaElement.buildSubElements(SchemaElement.java:233)
    at oracle.bpm.project.catalog.parser.xsd.Schema.buildType(Schema.java:74)
    at oracle.bpm.project.catalog.loaders.impl.XsdTypeLoader.buildTypes(XsdTypeLoader.java:89)
    at oracle.bpm.project.catalog.loaders.impl.XsdTypeLoader.loadTypes(XsdTypeLoader.java:77)
    at oracle.bpm.project.catalog.loaders.AbstractTypeLoader.buildTypes(AbstractTypeLoader.java:141)
    ... 83 more

    Dear,
    I think  you have created GL as cost element.
    Now you have to assign it in OKB9 - Display View "Account assignment" : Overview
    In OKB9 specify weather this cost element give impact to cost center or profitability segment.
    You have a cost account defined in accounts determination (OBYC). But every cost account must have a cost object associated (internal order, cost center, and so on).
    You must decide what is the cost object to 'receive' the cost value on the account.
    Go to OKB9, insert the account (can be plant dependant) and the cost object, then repeat GR.
    Regards,
    R.Brahmankar

  • BC4J: problems creating view object with multiple entity objects

    Hi,
    I working with a view object which contains two entity objects with parent-child relationship like this:
    ViewObject - ParentEntityObject - PId
    PAttribute
    CId (FK)
    (- ParentChildAssociation)
    - ChildEntityObject - CId
    - CAttribute
    The 'Read Only' and 'References' options are checked for the association in the view object.
    I'm creating a new row using this view object. The parent object should be created new and the child object already exists in the database, so I'm setting only the attributes of the parent object (including foreign key).
    After creating the row I display it in a jbo:DataTable and only those attributes coming from the parent object are displayed. The attributes of the child object are not set. After a commit all attributes appear.
    The problem is, that I want to display the new row with all attributes to the users BEFORE they commit.
    I tried to set the child attributes, but they are read only by definition and even when I unchecked the 'Read Only' option and set the attributes to 'Always Updateable' in the view object it is giving me
    JBO-27008: Attribute set for CAttribute in view object ViewObject failed.
    Is there a way to make all attributes of the child object visible in the view object without committing changes?
    (JDev 9.0.2.822)
    Any help would be appreciated.
    Regards,
    Christian

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • Can we create a structure with string type not char??

    Hi All
    Can we create a structure with type STRING not as a CHAR type??
    Please its urgent.
    Regards
    Deepanker

    HI,
    Yes, you can string instead of CHAR.
    Please follow the steps below :
    SE11 --> Table name --> Create Button --> And input the short description and necessary Delivery and Maintenance fields --> Select Fields tab --> Input some name on field --> And Click on Predefined button --> Press F4 on Data type column --> a Pop window will be displayed --> Select String from that.
    Thanks,
    Sriram Ponna.

  • Creating View Object with different criteria

    Hi,
    I have a requirement to execute the following queries in the application logic. We have YEAR table with mileage rates with different effective dates. If the service date is greater than any of the existing effective dates we need to get the rate with that effective date. if the service date is less than the existing effective dates, then we have to get the rate with least effective date.
    SELECT mileage_rate, ... FROM year
    WHERE eff_date =  (SELECT MAX(eff_date) FROM   year WHERE  eff_date <= :bServiceDate)
    SELECT MILEAGE_RATE, .... FROM YEAR WHERE
    EFF_DATE =  (SELECT MIN(EFF_DATE) FROM YEAR)
    We have to execute the 1st query and if there is no matching records then we have to take the second query with min effective date. At present we are creating two view objects for the above scenario. Is there any possibility to create one view object with different criteria. What is the best solution to handle the above problem in ADF.
    Thanks and Regards,
    S R Prasad

    Well on the ViewObjectImpl you can fire the method getQueryHitCount() passing in the required ViewRowSetImpl. If you get the query hit count as 0, use can attached the other query and execute it.

  • Creating Mime-messages from String data

    How do I save string data of email received from Outlook Express by calling BufferedReader's readLine() method over a socket a connection so that it can be converted into MimeMessage.

    Sorry but i didn't read your code snipppet so well.
    So you have a Vector v wicht contains the client part of the dialog.
    This is a typical conversation: ( you don't use EHLO or HELO handshake!? it's considered rude not to introduce yourself :) )
    EHLO CLIENTNAME
    250
    MAIL FROM:<[email protected]>
    250 MAIL FROM:<[email protected]> OK
    RCPT TO:<[email protected]>
    250 RCPT TO:<[email protected]> OK
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    Message-ID: <24569170.1093420595394.JavaMail.cau@PTWPC019>
    From: [email protected]
    To: [email protected]
    Subject: something
    Mime-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="----=_Part_0_17459938.1093420595224"
    ------=_Part_0_17459938.1093420595224
    Content-Type: text/plain; charset=US-ASCII
    Content-Transfer-Encoding: 7bit
    TEXT CONTENTS
    ------=_Part_0_17459938.1093420595224
    Content-Type: text/html; charset=US-ASCII
    Content-Transfer-Encoding: 7bit
    <b>HTML CONTENTS<b>
    ------=_Part_0_17459938.1093420595224--
    250 <412ADBC5000000B5> Mail accepted
    QUIT
    221 ontrob1.bmsg.nl QUIT
    The results in the vector from DATA to the ending dot . should be the part of your constructor string;
    Use this constructor
    MimeMessage mm = new MimeMessage(null,  ByteArrayInputStream( yourstring.getBytes() )  ) ;at this moment you can deconstruct the mime further.
    maybe this code will help:
    you should call the dumpPart method like this dumpPart( mm );
         Store store;
         Folder folder;
         static boolean verbose = false;
         static boolean debug = false;
         static boolean showStructure = true;
         private static void dumpPart(Part part) throws Exception {
              if (part instanceof Message)
                   dumpEnvelope((Message) part);
              /** //Dump input stream ..
              InputStream is = part.getInputStream();
              // If "is" is not already buffered, wrap a BufferedInputStream
              // around it.
              if (!(is instanceof BufferedInputStream))
                   is = new BufferedInputStream(is);
              int c;
              while ((c = is.read()) != -1)
                   System.err.write(c);
              pr("CONTENT-TYPE: " + part.getContentType());
              * Using isMimeType to determine the content type avoids
              * fetching the actual content data until we need it.
              if (part.isMimeType("text/plain")) {
                   pr("This is plain text");
                   pr("---------------------------");
                   if (!showStructure)
                        System.out.println((String) part.getContent());
              } else if (part.isMimeType("multipart/*")) {
                   pr("This is a Multipart");
                   pr("---------------------------");
                   Multipart mp = (Multipart) part.getContent();
                   level++;
                   int count = mp.getCount();
                   for (int i = 0; i < count; i++)
                        dumpPart(mp.getBodyPart(i));
                   level--;
              } else if (part.isMimeType("message/rfc822")) {
                   pr("This is a Nested Message");
                   pr("---------------------------");
                   level++;
                   dumpPart((Part) part.getContent());
                   level--;
              } else if (!showStructure) {
                   * If we actually want to see the data, and it?s not a
                   * MIME type we know, fetch it and check its Java type.
                   Object o = part.getContent();
                   if (o instanceof String) {
                        pr("This is a string");
                        pr("---------------------------");
                        System.out.println((String) o);
                   } else if (o instanceof InputStream) {
                        System.err.println("HELLO CAU 1111");
                        pr("This is just an input stream");
                        pr("---------------------------");
                        InputStream is2 = (InputStream) o;
                        int c2;
                        while ((c2= is2.read()) != -1)
                             System.out.write(c2);
                        System.err.println("\nHELLO CAU");
                   } else {
                        pr("This is an unknown type");
                        pr("---------------------------");
                        pr(o.toString());
              } else {
                   pr("This is an unknown type");
                   pr("---------------------------");
         private static void dumpEnvelope(Message msg) throws Exception {
              pr("This is the message envelope");
              pr("---------------------------");
              Address[] a;
              // FROM
              if ((a = msg.getFrom()) != null) {
                   for (int j = 0; j < a.length; j++)
                        pr("FROM: " + a[j].toString());
              //TO
              if ((a = msg.getRecipients(Message.RecipientType.TO)) != null) {
                   for (int j = 0; j < a.length; j++)
                        pr("TO: " + a[j].toString());
              // SUBJECT
              pr("SUBJECT: " + msg.getSubject());
              // DATE
              Date d = msg.getSentDate();
              pr("SendDate: " + (d != null ? d.toString() : "UNKNOWN"));
              //FLAGS
              Flags flags = msg.getFlags();
              StringBuffer sb = new StringBuffer();
              Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
              boolean first = true;
              for (int i = 0; i < sf.length; i++) {
                   String s;
                   Flags.Flag f = sf;
                   if (f == Flags.Flag.ANSWERED)
                        s = "\\Answered";
                   else if (f == Flags.Flag.DELETED)
                        s = "\\Deleted";
                   else if (f == Flags.Flag.DRAFT)
                        s = "\\Draft";
                   else if (f == Flags.Flag.FLAGGED)
                        s = "\\Flagged";
                   else if (f == Flags.Flag.RECENT)
                        s = "\\Recent";
                   else if (f == Flags.Flag.SEEN)
                        s = "\\Seen";
                   else
                        continue; // skip it
                   if (first)
                        first = false;
                   else
                        sb.append(' ');
                   sb.append(s);
              String[] uf = flags.getUserFlags(); // get user-flag strings
              for (int i = 0; i < uf.length; i++) {
                   if (first)
                        first = false;
                   else
                        sb.append(' ');
                   sb.append(uf[i]);
              pr("FLAGS: " + sb.toString());
              // X-MAILER
              String[] hdrs = msg.getHeader("X-Mailer");
              if (hdrs != null)
                   pr("X-Mailer: " + hdrs[0]);
              else
                   pr("X-Mailer NOT available");
         static String indentStr = " ";
         static int level = 0;
         * Print a, possibly indented, string.
         public static void pr(String s) {
              if (showStructure)
                   System.out.print(indentStr.substring(0, level * 2));
              System.out.println(s);
    Tricae

  • How do I create an object with "click and drag" interaction?

    I want do make an object that I can move around the screen at will, so, I need a way to make a click and drag object in adobe edge.
    I also need this to work with touch devices and also to limit the movement of the object to one direction (x or y).
    Thank you all in advance.

    Thanks for your reply.  I tried doing what you said, creating a command by opening a new flash file, etc.  For some reason, I could make a rectangle and save that as a command, but making a shape using the polystar command didn't work - there was a red "x" next to it in the history panel.
    Anyway, even if I could do that, it's not what I want to do.  I want to be able to create a shape and then be able to change the shape dynamically.  For instance, I want to be able to create a series of points and draw curves between them to create a closed curve shape.  Then I want to be able to change the positions of the vertices so that the shape changes as the .swf is running.  Thanks.

  • Create generic object with API

    Hi,
    i have created a document category and saved it to cFolders configuration directory. I can create this document category with a web ui but i have to do it with API from my program. I have found only function CFX_API_DOC_CREATE to create a folder content. Can I use this function to create my document category? When yes - how can I set the document category during create? Or should i use another function?
    Kind regards,
    Boguslaw

    Generic object can be created with function module CFX_API_DOC_CREATE. The category id have to set up with the parameter I_TYPE_ID.

  • Create Oracle Object with array inside

    Hi
    I want create a db type with an attribute of dbms_sql.varchar2_table  type
    Example:
    create or replace type t_obj_gest_csv_h
       as object
    column_value_list dbms_sql.varchar2_table,
    It's possible?
    Stefano

    Not with dbms_sql.varchar2_table. You can't reference PL/SQL types when creating SQL type. You can create SQL nested table type and use it in object type:
    SQL> create or replace
      2    type StringList
      3      as table of varchar2(4000)
      4  /
    Type created.
    SQL> create or replace
      2    type t_obj_gest_csv_h
      3      as object(
      4                id number,
      5                s  StringList
      6               )
      7  /
    Type created.
    SQL>
    SY.

Maybe you are looking for