@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.imyeyu.io</groupId>
|
||||
<artifactId>timi-io</artifactId>
|
||||
<version>0.0.7</version>
|
||||
<version>0.1.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
@@ -92,7 +92,7 @@
|
||||
<dependency>
|
||||
<groupId>com.imyeyu.utils</groupId>
|
||||
<artifactId>timi-utils</artifactId>
|
||||
<version>0.0.14</version>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.imyeyu.io;
|
||||
|
||||
import com.imyeyu.java.TimiJava;
|
||||
import com.imyeyu.java.bean.ActionException;
|
||||
import com.imyeyu.java.bean.Callback;
|
||||
import com.imyeyu.java.bean.CallbackArg;
|
||||
import com.imyeyu.java.bean.timi.TimiCode;
|
||||
import com.imyeyu.java.bean.timi.TimiException;
|
||||
import com.imyeyu.java.bean.ResultCode;
|
||||
import com.imyeyu.utils.Decoder;
|
||||
import com.imyeyu.utils.OS;
|
||||
import com.imyeyu.utils.Text;
|
||||
@@ -233,7 +233,7 @@ public class IO implements OS.FileSystem {
|
||||
if (file.renameTo(resultFile) && resultFile.exists()) {
|
||||
return resultFile;
|
||||
}
|
||||
throw new TimiException(TimiCode.RESULT_BAD, "rename file fail: from " + file.getAbsolutePath() + ", to " + resultFile.getAbsolutePath());
|
||||
throw new ActionException(ResultCode.RESULT_BAD, "rename file fail: from " + file.getAbsolutePath() + ", to " + resultFile.getAbsolutePath());
|
||||
} else {
|
||||
String msg = "Illeagl file name: %s, not allow char: %s";
|
||||
if (OS.IS_WINDOWS) {
|
||||
@@ -661,7 +661,7 @@ public class IO implements OS.FileSystem {
|
||||
public static void toOutputStream(InputStream is, OutputStream os, long start, long end) throws IOException {
|
||||
long skip = is.skip(start);
|
||||
if (skip != start) {
|
||||
throw new TimiException(TimiCode.ERROR, "skip fail");
|
||||
throw new ActionException(ResultCode.ERROR, "skip fail");
|
||||
}
|
||||
byte[] buffer = new byte[8192];
|
||||
long remaining = end - start + 1;
|
||||
|
||||
Reference in New Issue
Block a user