This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Converting long integer to byte

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi!

I'm making a small application for J2ME. I need to convert long integer to byte table. Those long integers can very long like this: 3460215174411169804

How can I read this long to this kind of byte-table:

byte table[] = new byte[8];

I would like to see some examples.

Remember, I'm using J2ME, so I don't have all the classes in use, what can be use in J2SE.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Doublepost: https://coderanch.com/t/426556/Java-General-intermediate/How-to-read-long-to

DonĀ“t doublepost. Please stick to one topic. If you have new questions regarding to the given answers, post them in the originating topic instead of repeating the topic.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic