Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
f696f8a0
提交
f696f8a0
authored
11 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MVTableEngine: support online backup on Windows
上级
35cbaa1f
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
13 行增加
和
8 行删除
+13
-8
MVTableEngine.java
h2/src/main/org/h2/mvstore/db/MVTableEngine.java
+1
-1
FileChannelInputStream.java
h2/src/main/org/h2/store/fs/FileChannelInputStream.java
+7
-2
FilePathCrypt.java
h2/src/main/org/h2/store/fs/FilePathCrypt.java
+1
-1
FilePathMem.java
h2/src/main/org/h2/store/fs/FilePathMem.java
+1
-1
FilePathNioMem.java
h2/src/main/org/h2/store/fs/FilePathNioMem.java
+1
-1
FilePathZip.java
h2/src/main/org/h2/store/fs/FilePathZip.java
+1
-1
FilePathZip2.java
h2/src/tools/org/h2/dev/fs/FilePathZip2.java
+1
-1
没有找到文件。
h2/src/main/org/h2/mvstore/db/MVTableEngine.java
浏览文件 @
f696f8a0
...
@@ -231,7 +231,7 @@ public class MVTableEngine implements TableEngine {
...
@@ -231,7 +231,7 @@ public class MVTableEngine implements TableEngine {
}
}
public
InputStream
getInputStream
()
{
public
InputStream
getInputStream
()
{
return
new
FileChannelInputStream
(
store
.
getFile
());
return
new
FileChannelInputStream
(
store
.
getFile
()
,
false
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/fs/FileChannelInputStream.java
浏览文件 @
f696f8a0
...
@@ -17,15 +17,18 @@ import java.nio.channels.FileChannel;
...
@@ -17,15 +17,18 @@ import java.nio.channels.FileChannel;
public
class
FileChannelInputStream
extends
InputStream
{
public
class
FileChannelInputStream
extends
InputStream
{
private
final
FileChannel
channel
;
private
final
FileChannel
channel
;
private
final
boolean
closeChannel
;
private
final
byte
[]
buffer
=
{
0
};
private
final
byte
[]
buffer
=
{
0
};
/**
/**
* Create a new file object input stream from the file channel.
* Create a new file object input stream from the file channel.
*
*
* @param channel the file channel
* @param channel the file channel
* @param closeChannel whether closing the stream should close the channel
*/
*/
public
FileChannelInputStream
(
FileChannel
channel
)
{
public
FileChannelInputStream
(
FileChannel
channel
,
boolean
closeChannel
)
{
this
.
channel
=
channel
;
this
.
channel
=
channel
;
this
.
closeChannel
=
closeChannel
;
}
}
@Override
@Override
...
@@ -53,7 +56,9 @@ public class FileChannelInputStream extends InputStream {
...
@@ -53,7 +56,9 @@ public class FileChannelInputStream extends InputStream {
@Override
@Override
public
void
close
()
throws
IOException
{
public
void
close
()
throws
IOException
{
channel
.
close
();
if
(
closeChannel
)
{
channel
.
close
();
}
}
}
}
}
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/fs/FilePathCrypt.java
浏览文件 @
f696f8a0
...
@@ -77,7 +77,7 @@ public class FilePathCrypt extends FilePathWrapper {
...
@@ -77,7 +77,7 @@ public class FilePathCrypt extends FilePathWrapper {
@Override
@Override
public
InputStream
newInputStream
()
throws
IOException
{
public
InputStream
newInputStream
()
throws
IOException
{
return
new
FileChannelInputStream
(
open
(
"r"
));
return
new
FileChannelInputStream
(
open
(
"r"
)
,
true
);
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/fs/FilePathMem.java
浏览文件 @
f696f8a0
...
@@ -162,7 +162,7 @@ public class FilePathMem extends FilePath {
...
@@ -162,7 +162,7 @@ public class FilePathMem extends FilePath {
public
InputStream
newInputStream
()
{
public
InputStream
newInputStream
()
{
FileMemData
obj
=
getMemoryFile
();
FileMemData
obj
=
getMemoryFile
();
FileMem
m
=
new
FileMem
(
obj
,
true
);
FileMem
m
=
new
FileMem
(
obj
,
true
);
return
new
FileChannelInputStream
(
m
);
return
new
FileChannelInputStream
(
m
,
true
);
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/fs/FilePathNioMem.java
浏览文件 @
f696f8a0
...
@@ -162,7 +162,7 @@ public class FilePathNioMem extends FilePath {
...
@@ -162,7 +162,7 @@ public class FilePathNioMem extends FilePath {
public
InputStream
newInputStream
()
{
public
InputStream
newInputStream
()
{
FileNioMemData
obj
=
getMemoryFile
();
FileNioMemData
obj
=
getMemoryFile
();
FileNioMem
m
=
new
FileNioMem
(
obj
,
true
);
FileNioMem
m
=
new
FileNioMem
(
obj
,
true
);
return
new
FileChannelInputStream
(
m
);
return
new
FileChannelInputStream
(
m
,
true
);
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/fs/FilePathZip.java
浏览文件 @
f696f8a0
...
@@ -171,7 +171,7 @@ public class FilePathZip extends FilePath {
...
@@ -171,7 +171,7 @@ public class FilePathZip extends FilePath {
@Override
@Override
public
InputStream
newInputStream
()
throws
IOException
{
public
InputStream
newInputStream
()
throws
IOException
{
return
new
FileChannelInputStream
(
open
(
"r"
));
return
new
FileChannelInputStream
(
open
(
"r"
)
,
true
);
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/dev/fs/FilePathZip2.java
浏览文件 @
f696f8a0
...
@@ -245,7 +245,7 @@ public class FilePathZip2 extends FilePath {
...
@@ -245,7 +245,7 @@ public class FilePathZip2 extends FilePath {
@Override
@Override
public
InputStream
newInputStream
()
throws
IOException
{
public
InputStream
newInputStream
()
throws
IOException
{
return
new
FileChannelInputStream
(
open
(
"r"
));
return
new
FileChannelInputStream
(
open
(
"r"
)
,
true
);
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论