Top "Magic-numbers" questions

Magic numbers are unexplained values that often should be replaced with a named constant.

How to identify the file type even though the file-extension has been changed?

Files are categorized by file-extension. So my question is, how to identify the file type even the file extension has …

java filesystems file-extension magic-numbers
Does anyone know a list with magic numbers of file systems and archive/compression formats?

I'm looking for a list that has the magic numbers of the most important of the following file systems and …

filesystems compression archive firmware magic-numbers
What's the significance of -532459699?

This is a number that's returned as an exit code in many .NET exceptions (particularly COM exceptions, I think). In …

.net exception magic-numbers
Magic number for plain text file

After googling, I found that Magic numbers can be used to identify the content type of a file. In my …

magic-numbers
How to get the magic number from File in java

I have file from UploadedFile button, and I want to print the extension files by use in magic number, My …

java file-extension magic-numbers
Original file bytes from StreamReader, magic number detection

I'm trying to differentiate between "text files" and "binary" files, as I would effectively like to ignore files with "unreadable" …

c# .net encoding .net-4.0 magic-numbers
Java's checkstyle, MagicNumberCheck

I am using checkstyle to get reportings about my source-code. This question is about the MagicNumberCheck. I am using Date/(…

checkstyle magic-numbers
Why do we need a magic number in the beginning of the .class file?

I read a few posts here about the magic number 0xCAFEBABE in the beginning of each java .class file and …

java magic-numbers