Connecting Tech Pros Worldwide Forums | Help | Site Map

Generate barcode from a string in java

Newbie
 
Join Date: May 2009
Posts: 15
#1: May 23 '09
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,

JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: May 23 '09

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
Newbie
 
Join Date: May 2009
Posts: 15
#3: May 24 '09

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.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#4: May 25 '09

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
Newbie
 
Join Date: May 2009
Posts: 15
#5: May 25 '09

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.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#6: May 25 '09

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
Newbie
 
Join Date: May 2009
Posts: 15
#7: May 27 '09

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
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#8: May 27 '09

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