Results 1 to 5 of 5
  1. #1
    bozovilla is offline Member
    Join Date
    Nov 2007
    Posts
    19
    Rep Power
    0

    Default retrieving data from token

    I have an array stored in each token in a string tokenizer. How do I get the length of each token, which means getting the length of each array and how do i retrieve the values of each array in each token? It would be helpful if codes are provided to my responds. Thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    What do you mean by a token? Is it what is returned by the StringTokenizer class?
    Can you describe your problem some more. You talk about array, the length of tokens, the length of array, values of array in token.
    Your mixing of words and concepts makes no sense.
    You can't store an array in a token.

    The length of an array is obtained by the length attribute.
    The length of a String is obtained by the length() method.
    Elements in an array are retrieved by indexing into the array.

  3. #3
    bozovilla is offline Member
    Join Date
    Nov 2007
    Posts
    19
    Rep Power
    0

    Default

    Firstly, I need to retrieve data directly from the database that is already in a form of an array and print it out onto a file. So I would use codes like this:

    out.write(rs.getString("driage")+"|"+rs.getString( "drinam")+"|"

    driage is an array of data and so is drinam.

    After printing it onto the file, I use powerfultokenizer which i supposed its the same as a string tokenizer to seperate each data field into various tokens. For e.g., driage data is in one token and drinam is in another.

    So, each token would have an array. How do I get the length of it and retrieve the data from it? Does that make sense? If not then I'll try other ways. I'm not even sure if that works.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    Sorry, I don't know anything about the classes you are using or about databases.

  5. #5
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    You'll have to give us some more detail on whatever class your token is, because we don't have your code and do not know how your API is supposed to work.

Similar Threads

  1. Problem retrieving data to JSP from Bean [using Hibernate]
    By linking90 in forum JavaServer Pages (JSP) and JSTL
    Replies: 11
    Last Post: 09-09-2010, 05:50 PM
  2. (Java newbie) retrieving data from a web site
    By idum in forum Networking
    Replies: 4
    Last Post: 10-12-2009, 07:37 PM
  3. Store data is not retrieving
    By JavaJunkie in forum CLDC and MIDP
    Replies: 2
    Last Post: 05-30-2009, 08:08 AM
  4. error while retrieving data from data base
    By kirtesh4u in forum New To Java
    Replies: 5
    Last Post: 11-15-2008, 04:10 PM
  5. Retrieving data from the DB
    By yuchuang in forum JDBC
    Replies: 2
    Last Post: 11-27-2007, 08:59 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •