Octet Stream Converter

  1. Select file, which you want to convert from your computer, Google Drive, Dropbox or drag and drop it on the page. Select pdf or any other format, which you want to convert (more 200 supported formats) Step 3. Wait till your file will be converted and click download pdf -file.
  2. Number System Converter TV Show and Movie Ratings Secure Group Chat About Meet Base64 Decode and Encode, a simple online tool that does exactly what it says: decodes from Base64 encoding as well as encodes into it quickly and easily. Base64 encode your data without hassles or decode it into a human-readable format.
  1. Octet Stream To Pdf Converter
  2. Octet Stream Converter Extension

What is an OCTET-STREAM file?

Octet stream converter download

Number System Converter TV Show and Movie Ratings Secure Group Chat About Meet Base64 Decode and Encode, a simple online tool that does exactly what it says: decodes from Base64 encoding as well as encodes into it quickly and easily. Base64 encode your data without hassles or decode it into a human-readable format.

The OCTET-STREAM format is used for file attachments on the Web with an unknown file type. These .octet-stream files are arbitrary binary data files that may be in any multimedia format. The OCTET-STREAM format was developed for Web browsers to understand that the file attachment is in an unknown file type, which also allows the user to choose to download and save the attached file in any file format that the user wants.In other instances, the OCTET-STREAM file format is used to inform the user that the attached file may be saved in a recommended file format. This also allows the Web browser to enable the user to know the recommended file format for the attached .octet-stream file.These OCTET-STREAM files may be opened by renaming the extension of the attached file to a specific file extension, and then by using an application with support for opening such files. For example, an .octet-stream file may be renamed to a .txt file (if it is indeed a .txt file), and Notepad may then be used to open the file. This means the user needs to know the file type of the attached .octet-stream file before renaming the file in the correct file extension.

Octet Stream Converter
Spring Boot (RestController) - support for application/octet-stream using InputStream
WebConfig.groovy
/**
* Adds support for application/octet-stream through a RestController using streams.
*/
@Configuration
classWebConfigextendsWebMvcConfigurationSupport {
@Override
protectedvoidconfigureMessageConverters(List<HttpMessageConverter<?>>converters) {
converters.add(newAbstractHttpMessageConverter<InputStream>(MediaType.APPLICATION_OCTET_STREAM) {
protectedbooleansupports(Class<?>clazz) {
returnInputStream.isAssignableFrom(clazz)
}
protectedInputStreamreadInternal(Class<? extends InputStream>clazz, HttpInputMessageinputMessage) throwsIOException, HttpMessageNotReadableException {
return inputMessage.body
}
protectedvoidwriteInternal(InputStreaminputStream, HttpOutputMessageoutputMessage) throwsIOException, HttpMessageNotWritableException {
IOUtils.copy(inputStream, outputMessage.body)
}
})
super.configureMessageConverters(converters);
}
}

commented Aug 19, 2015

I was using RestController and wanted to have certain endpoints that accept binary file uploads with Content-Type: application/octet-stream, and certain other endpoints that deliver downloads the same way. I did not want to use multipart/form-data.

As far as I could tell, Spring does not support this out of the box, but it's easy enough to add as shown in this gist.

Once the message converter is registered, here's an example of it in use:

commented Jun 17, 2016

Stream

Perfect - I was not aware that spring is not able for such a simple thing... thx a lot!

commented Mar 18, 2017

commented Oct 5, 2017

Octet Stream To Pdf Converter

commented Oct 30, 2017

Thanks for this, really useful. Note that I made a Java version from the groovy one.

Octet Stream Converter Extension

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment