• Post Reply 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can i check i byte[] contains binary bytes ???

 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a byte[], and if its contains binary bytes i have to set up an exception, can i check this, and if how ???


Frank
 
Ranch Hand
Posts: 1252
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Jacobsen:
I have a byte[], and if its contains binary bytes i have to set up an exception, can i check this, and if how ???


Frank



Frank,

What do you mean by binary bytes.

Come up with some more context.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Off to Java in General (Beginner).
 
Frank Jacobsen
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jMimeMagic is a Java library for determining the MIME type of files or streams, this you can find on google i you search on jMimeMagic, but is this possible without using this jar file from jMimeMagic ???


Frank
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So by "binary bytes" you mean that the bytes represent certain non-text file types? Well, some file types have a magic number -- the first few bytes are always some certain value that identifies the file. For example, the first four bytes of a Java class file are 0xCA 0xFE 0xBA 0xBE , and the first few bytes of a GIF image are 0x47 0x49 0x45. But not all file types have a magic number, which is why figuring out the type of a file from the bytes is sometimes tricky.

The web site Wotsit's Format is a repository of information about file formats: it will likely have all known information about whatever file formats you're interested in.
 
Frank Jacobsen
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, just what i was searching fore

Frank
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic