• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Header doubt?

 
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

What exactly does the Enumeration getHeaders(String name) does?? They say that it returns and enumerated list of Headers with the name given as the parameter. But there can be only one header value associated with a given name right??
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There can be multiple values associated with one header name.

Thanks
 
Joe Harry
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, got it thanks!
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jothi

thats why you have two different methods..

  • getHeader(String name) --> returns a String
  • getHeaders(String name) --> returns an Enumeration



  • If you want to get just the Header names alone, you can use getHeaderNames() which will also return an Enumeration containing the names alone.


    HtH.
     
    Ranch Hand
    Posts: 304
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I also intially got confused since i was thinking it should be something like Enumeration getParamaterValues(String name) but it is...

    Enumeration getHeaders()

    Beware!
     
    girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
      Bookmark Topic Watch Topic
    • New Topic