File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to fetch the first data from similar datas?

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

When i run my java program, i am getting the hangup event as output like the following:


org.asteriskjava.manager.event.HangupEvent[dateReceived=Tue Jan 18 12:35:51 GMT+05:30 2011,privilege='call,all',causetxt='user busy',callerid='null',cause='16',state='null',calleridname='null',timestamp='null',uniqueid='1295334351.25',calleridnum='null',channel='busy',systemHashcode=32680410]

org.asteriskjava.manager.event.HangupEvent[dateReceived=Tue Jan 18 12:35:51 GMT+05:30 2011,privilege='call,all',causetxt='Bearer capability not available',callerid='null',cause='58',state='null',calleridname='null',timestamp='null',uniqueid='1295334351.21',calleridnum='null',channel='OutgoingSpoolFailed',systemHashcode=32680410]



Here i need to take the first hangup event. please assist me to do this.

Thanks.

 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "take the first hangup event"? Is this a log file that you're parsing, and you somehow need to select some of the log records? If so, what is the logic that distinguishes "some records" from all others?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47244
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving discussion as too difficult for "beginning".
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic