Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Header information

 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is Enumeration ???

The folloing Function returns Enum type and i want to see the returns values.
How do i get that ?

Object header = msg1.getAllHeaderLines();

The thing i want to do is

From : <jnaik@travelguru.com>
Sent : Tuesday, December 26, 2006 2:52 PM
To : naikjigar@hotmail.com
CC : kkhatau@travelguru.com
Subject : HTML Body

| | | Inbox

MIME-Version: 1.0
Received: from smtp1.netmagicians.com ([202.87.39.91]) by bay0-mc6-f2.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Tue, 26 Dec 2006 01:22:10 -0800
Received: from tg-jnaik (unknown [125.18.4.42])by smtp1.netmagicians.com (Postfix) with ESMTP id 8F7857E4098;Tue, 26 Dec 2006 14:52:38 +0530 (IST)
X-Message-Info: txF49lGdW41dUR3IqFR5KXak4GVtGjJ2SIZDRpAHc10=
Jigar: Naik
X-NetMagic-MailScanner-Information: Powered By NetMagic Mail Protection v1.0
X-NetMagic-MailScanner: Found to be clean
X-NetMagic-MailScanner-From: jnaik@travelguru.com
Return-Path: jnaik@travelguru.com
X-OriginalArrivalTime: 26 Dec 2006 09:22:10.0676 (UTC) FILETIME=[52423340:01C728CF]



I don't want the quoted information to be dispied at the e-mail receiver end...

can any one guide me towards the same ???
[ December 26, 2006: Message edited by: Jigar Naik ]
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically in programing enumeration is following. Let's say you want to define some "words" as a values. In c++ language you need t do following
#define SPRING 0
#define SUMMER 1
#define FALL 2
#define WINTER 3

An alternate approach using enum would be
enum { SPRING, SUMMER, FALL, WINTER };

So it means that when you write enum { SPRING, SUMMER, FALL, WINTER }; SPRING will be 0, SUMMER will be 1, etc... so it is just easier way to define.
In Java if you have some Enum class object you can get values using it's valueOf() method...
 
Jigar Naik
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OKIS THANKS...
 
What's gotten into you? Could it be this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic