Illegal character in opaque part at index

简介: Illegal character in opaque part at index

在我这里主要是因为windows用FileChannel 路径问题 ,代码如下

ByteBuffer byteBuffer = ByteBuffer.allocate(1024);
FileChannel fileChannel = FileChannel.open(Paths.get(URI.create("file:\\D:\\soft\\doc\\filechanel.txt")) );
        int readInt = fileChannel.read(byteBuffer);

这里是不对的,不支持反斜杠

file:\\D:\\soft\\doc\\filechanel.txt 或者D:\\soft\\doc\\filechanel.txt

正确应是:

file:/D:/soft/doc/filechanel.txt


相关文章
|
SQL
Parameter ‘id‘ not found. Available parameters are [collection, list]
Parameter ‘id‘ not found. Available parameters are [collection, list]
253 0
|
JavaScript
Invalid char (/) found at index (10) in sheet name异常原因|导出excel出现Invalid char (/) found at index (10)
Invalid char (/) found at index (10) in sheet name异常原因|导出excel出现Invalid char (/) found at index (10)
error • The parameter ‘name‘ can‘t have a value of ‘null‘ because of its type错误
error • The parameter ‘name‘ can‘t have a value of ‘null‘ because of its type错误
错误代码: 1364 Field ‘password‘ doesn‘t have a default value
错误代码: 1364 Field ‘password‘ doesn‘t have a default value
|
应用服务中间件 nginx Windows
1113: No mapping for the Unicode character exists in the target multi-byte code page
1113: No mapping for the Unicode character exists in the target multi-byte code page
777 0
1113: No mapping for the Unicode character exists in the target multi-byte code page
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
333 0
|
关系型数据库 PostgreSQL
PostgreSQL - ERROR: could not determine data type of parameter $1
PostgreSQL - ERROR: could not determine data type of parameter $1
2185 0
成功解决ValueError: Parameter values for parameter (n_estimators) need to be a sequence.
成功解决ValueError: Parameter values for parameter (n_estimators) need to be a sequence.
成功解决ValueError: Parameter values for parameter (n_estimators) need to be a sequence.
|
SQL Java 数据库
PreparedStatement 模糊匹配 结果却:Parameter index out of range (1 > number of parameters, which is 0)
PreparedStatement 模糊匹配 结果却:Parameter index out of range (1 > number of parameters, which is 0)
484 0
|
Java 数据安全/隐私保护 安全
Illegal key size or default parameters
java中使用AES对称加密后,请求报错: Caused by: java.lang.RuntimeException: java.security.InvalidKeyException: Illegal key size or default parameters at com.
5675 0

热门文章

最新文章

下一篇
开通oss服务