I need to detect the document type of the given file. I did it using magic numbers for pdf,RTF, doc files. but whenever I tried to do the same on odt and docx files, unfortunately, I can't because the magic number for both are same. Please help me to sort this issue. I need the answer programmatically in java Thanks in advance.
How to differentiate .odt and .docx file apart from magic number and extension
477 Views Asked by venkatesh karthick At
1
There are 1 best solutions below
Related Questions in FILE
- Saving FileSystemInfo Array to File
- C programming: Create and write 2D array of files as function
- How can I change a specific line in a file with node js?
- Grabbing Edits from two strings
- In Android, would it be possible to open a file in the 'values' folder and to read its content?
- Using paths bonded to a XCode project to be shared
- Why am i getting these invalid characters before my file data?
- Optimum directory structure for large number of files to display on a page
- C Reading binary file with fread()
- Renaming a File() object in JavaScript
- How to write the current time to a new line of a .txt file on php execution
- introduce c++ into html
- How can I create a simple text file on a windows phone (8.1) that can be accessed trough USB cable?
- Pop-up and download zip file in ASP.NET
- Using access() in C
Related Questions in FILE-TYPE
- Excluding items from a list in coldfusion by type
- Convert a filetype to its original state
- Files downloaded through a spring controller are corrupted
- Creating multiple .vimrc for multiple languages?
- Webstorm not recognising JavaScript file
- "file" command in linux differing in output across machines
- Groovy File Traverse behavior when parsing file
- Enabling certain plugins and options for .h and .cpp files only in Vim
- Bash Command for Finding the size of all files with particular filetype in a directory in ubuntu
- What is the difference between filetype= and syntax= in Vim?
- How to read filename of the last modified file in a directory?
- How to create my own custom file type containing an image or an audio file
- How do I force my app to recognize .ts files as video?
- Opening a file from another app's "Open In" menu
- vim does not recognize my filetype
Related Questions in MAGIC-NUMBERS
- Finding out file type based on character inside a file
- SonarQube: Should magic numbers be allowed in java constructor enums
- How to get the magic number from File in java
- Minifilter - Reading file header
- Choosing a magic byte least likely to appear in real data
- How to get rid of magic numbers background
- Magic numbers in C++ implementation of Excel NORMDIST function
- Magic number in boost::hash_combine
- Searching for a safe magic number for in-memory data structure
- Is there a tool for the conversion of duplicate literals into final Strings/magic numbers in Java?
- Looking for determine file type from the magic number
- non-NULL reserved pointer value
- Why use magic number in the implementation of regex in java?
- How to determine if a byte is null in a word
- Inserting magic number into class files
Related Questions in DOCUMENT-TYPES
- How to Open Document Picker on Button Click in React native
- Custom file type is not showing "Open With"
- How would you import content into Umbraco page Grid Layout using ContentService?
- Umbraco - Editable List view inside detail view of Document
- Determine SAP Document Type changes during the year
- Xamarin iOS: What are the document types for OpenOffice and Microsoft Office
- Document Type Icon not showing on custom file MacOS
- How to differentiate .odt and .docx file apart from magic number and extension
- Kentico & CMSForm: Load a different form after page load?
- why are my gestures not being reconized when i enter my app via URL Shortcut (open pdf in my app)?
- Cannot move members in Umbraco TypeError: contentResource.move is not a function
- Elasticsearch return all documents of a given type
- "Open in" feature in Safari iOS 9 not working
- "Open In" should show my app in iPhones Camera Roll
- How to publish messages into Document Store in webmethods IS without broker
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What I just tried now :