471,829 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,829 software developers and data experts.

Generate barcode from a string in java

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:

Or muybe another solution?

May 23 '09 #1
7 5909
11,448 Expert 8TB
Both UPC and EAN barcodes encode just sequences of digits; which encoding do you have in mind?

kind regards,

May 23 '09 #2
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)

May 24 '09 #3
11,448 Expert 8TB
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,

May 25 '09 #4
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.
May 25 '09 #5
11,448 Expert 8TB
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,

May 25 '09 #6
true @JosAH
a mathod to produce a barcode (some graphics you can print out for the player).

thank u

May 26 '09 #7
11,448 Expert 8TB
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,

May 27 '09 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

21 posts views Thread by CHANGE username to westes | last post: by
4 posts views Thread by Tom | last post: by
2 posts views Thread by Breda Photo Fair | last post: by
2 posts views Thread by angus | last post: by
2 posts views Thread by chris_gpf1 | last post: by
reply views Thread by NeoPa | last post: by
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.