Move on EFI

efi

More PCs and laptops use EFI instead legacy BIOS mode. And my laptop too, but I use legacy mode.

But I want use EFI too. Because I test many different gentoo (differrent DM, systemd …) on USB stick. Laptop can load only system with EFI on USB stick. So I load live dvd with efi and install grub from Live USB. It’s uncomfotably and I decided move my laptop on EFI.

Read more

String deduplication

Java String Deduplication

In Java 8u20 release was add String Deduplication. It’s can save little memory. Becouse GC will try searching duplicated string and use for string objects one byte buffer. But people say that feature isn’t safe.

But… Today I have Java version 8u102 and I think that feature was stabilized. I test it’s.

Read more

Streaming video processing

I used ffmpeg for streaming video processing.

On linux i used command for testing streaming processing

After I sought ffmpeg for Java. But I found the ability for run command of Java.

For this can use class ProccessBuilder

Example code (transcoding input.mp4(h264) in output.avi)

To select the codec and other parametrs you can use keys for command ffmpeg

Accessing input stream

I am can get access to input stream while file to upload on the server.

This can be used method

But in this stream isset data about other objects and types of data.

Other methods aren’t suitable, because we have access to input stream only after load full file on server.

The plans to write a parser that will receive only stream a file.

Example code (get ServletInputStream and write all lines):