You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to review the following points in order to improve the implementation of the class: Sysfs.java
Slf4j checks for log level can be removed when formatting log function overloads are used. This way Slf4j does the checking on its own.
change writeString() to use FileOutputStream and better exception handling. This could also make it a little bit more faster. Also, it would integrate Removing check for writable file #650.
change writeInteger() to use Integer.toString().
change readString() to use better exception handling.
change getElements() to check for null return value (IntelliJ warning)
Conversion of ByteBuffer to byte[] turned out to not be a good idea (a null character was appended to the string). Using FileChannel instead of FileOutputStream seems to work with the ByteBuffer.
Activity
JakubVanek commentedon Mar 14, 2019
Conversion of ByteBuffer to byte[] turned out to not be a good idea (a null character was appended to the string). Using FileChannel instead of FileOutputStream seems to work with the ByteBuffer.
JakubVanek commentedon Mar 14, 2019
Hmmm, I switched it back to FileOutputStream + String.getBytes(), as it seems to be less complex and the path to native code is almost direct.
JakubVanek commentedon Mar 14, 2019
#654 should be ready.
JakubVanek commentedon Sep 25, 2019
Not essential