@Override
        public void write(byte[] b, int off, int len) throws IOException {
            buffer.put(b, off, len);
            buffer.flip();
            rawCanChannel.writeUnsafe(buffer);
            // the NIO clear call does clear positions and limits, but does not erase contents of buffer.
            // since we write a complete frame with length any remaining data at the end of memory block
            // should be ignored. When we get payload of full length it will eventually override earlier data
            // which was not used
            buffer.clear();
        }
InputStream that fulfills the contract of Netty for read operations to timeout.
Without this the InputStream would simply block indefinitely which would block
the entire IO module.
plc4j/transports/socketcan/src/main/java/org/apache/plc4x/java/transport/socketcan/netty/SocketCANChannel.java