Connecting Tech Pros Worldwide Help | Site Map

Generate barcode from a string in java

  #1  
Old May 23rd, 2009, 01:30 PM
Newbie
 
Join Date: May 2009
Posts: 15
Hello
I have a table of players, each player in the team should have unique barcode:



The barcode scanner returns an array of chars.
The next player_id = char++, example:
aaa
aab
aac
...
aba
aca
..
baa


Or muybe another solution?



Kr,
  #2  
Old May 23rd, 2009, 02:05 PM
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,634
Provided Answers: 2

re: Generate barcode from a string in java


Both UPC and EAN barcodes encode just sequences of digits; which encoding do you have in mind?

kind regards,

Jos
  #3  
Old May 24th, 2009, 02:33 PM
Newbie
 
Join Date: May 2009
Posts: 15

re: Generate barcode from a string in java


Thanks but i am sorry to say I don't understand your response.
I asked what should I do to generate a barcode on basis of an array of chars?

All I know is when I take the barcode reader and scan a barcode, the output is like this in (player_id)



Kr,
F.
  #4  
Old May 25th, 2009, 03:32 PM
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,634
Provided Answers: 2

re: Generate barcode from a string in java


Quote:
Originally Posted by freethinker View Post
Thanks but i am sorry to say I don't understand your response.
I asked what should I do to generate a barcode on basis of an array of chars?

All I know is when I take the barcode reader and scan a barcode, the output is like this in (player_id)



Kr,
F.
I don't think that barcode reader gives your (16 bit or utf-8) chars; it just gives you bytes. Read those bytes and use them as a unique id.

kind regards,

Jos
  #5  
Old May 25th, 2009, 06:01 PM
Newbie
 
Join Date: May 2009
Posts: 15

re: Generate barcode from a string in java


Quote:
Originally Posted by JosAH View Post
I don't think that barcode reader gives your (16 bit or utf-8) chars; it just gives you bytes. Read those bytes and use them as a unique id.
Thank you, that is what I also do, the string or bytes I get as return value when I read a barcode with barcode reader, I use it as unique id.

I am now looking for a good working solution on how to generate a barcode which gives you the code (bytes for example) you have in the table as unique id.
  #6  
Old May 25th, 2009, 07:11 PM
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,634
Provided Answers: 2

re: Generate barcode from a string in java


Quote:
Originally Posted by freethinker View Post
Thank you, that is what I also do, the string or bytes I get as return value when I read a barcode with barcode reader, I use it as unique id.

I am now looking for a good working solution on how to generate a barcode which gives you the code (bytes for example) you have in the table as unique id.
I don't understand what you want then; you have a unique key (a byte[] array) produced by your barcode reader; you have your data that belongs to that key so what other key do you want?

kind regards,

Jos
  #7  
Old May 27th, 2009, 12:52 AM
Newbie
 
Join Date: May 2009
Posts: 15

re: Generate barcode from a string in java


Quote:
Originally Posted by JosAH View Post
you have a unique key (a byte[] array) produced by your barcode reader;
true
Quote:
Originally Posted by JosAH View Post
you have your data that belongs to that key
true
Quote:
Originally Posted by JosAH View Post
so what other key do you want?
a mathod to produce a barcode (some graphics you can print out for the player).

thank u

kr,
e
  #8  
Old May 27th, 2009, 04:41 PM
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,634
Provided Answers: 2

re: Generate barcode from a string in java


Quote:
Originally Posted by freethinker View Post
a mathod to produce a barcode (some graphics you can print out for the player).
That's easy; there are numerous packages available that can print barcodes for you; google for "print barcode Java" and see for yourself.

kind regards,

Jos
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I redefine an element in an extended type? bjhartin@yahoo.com answers 0 April 11th, 2006 05:15 PM