Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
3fb8c0f8
提交
3fb8c0f8
authored
12月 12, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Javadocs.
上级
c6d8fe4d
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
28 行增加
和
1 行删除
+28
-1
FileObjectMemoryData.java
h2/src/main/org/h2/store/fs/FileObjectMemoryData.java
+2
-0
FileSystemDiskNio.java
h2/src/main/org/h2/store/fs/FileSystemDiskNio.java
+3
-0
FileSystemDiskNioMapped.java
h2/src/main/org/h2/store/fs/FileSystemDiskNioMapped.java
+3
-0
SimpleXid.java
h2/src/test/org/h2/test/jdbcx/SimpleXid.java
+5
-0
TestXASimple.java
h2/src/test/org/h2/test/jdbcx/TestXASimple.java
+1
-1
WebClient.java
h2/src/test/org/h2/test/server/WebClient.java
+14
-0
没有找到文件。
h2/src/main/org/h2/store/fs/FileObjectMemoryData.java
浏览文件 @
3fb8c0f8
...
@@ -151,6 +151,8 @@ class FileObjectMemoryData {
...
@@ -151,6 +151,8 @@ class FileObjectMemoryData {
/**
/**
* Update the last modified time.
* Update the last modified time.
*
* @param openReadOnly if the file was opened in read-only mode
*/
*/
void
touch
(
boolean
openReadOnly
)
throws
IOException
{
void
touch
(
boolean
openReadOnly
)
throws
IOException
{
if
(
isReadOnly
||
openReadOnly
)
{
if
(
isReadOnly
||
openReadOnly
)
{
...
...
h2/src/main/org/h2/store/fs/FileSystemDiskNio.java
浏览文件 @
3fb8c0f8
...
@@ -15,6 +15,9 @@ import java.io.InputStream;
...
@@ -15,6 +15,9 @@ import java.io.InputStream;
*/
*/
public
class
FileSystemDiskNio
extends
FileSystemDisk
{
public
class
FileSystemDiskNio
extends
FileSystemDisk
{
/**
* The prefix for the file system that uses java.nio.channels.FileChannel.
*/
static
final
String
PREFIX
=
"nio:"
;
static
final
String
PREFIX
=
"nio:"
;
static
{
static
{
...
...
h2/src/main/org/h2/store/fs/FileSystemDiskNioMapped.java
浏览文件 @
3fb8c0f8
...
@@ -14,6 +14,9 @@ import java.io.IOException;
...
@@ -14,6 +14,9 @@ import java.io.IOException;
*/
*/
public
class
FileSystemDiskNioMapped
extends
FileSystemDiskNio
{
public
class
FileSystemDiskNioMapped
extends
FileSystemDiskNio
{
/**
* The prefix for the file system that uses memory mapped files.
*/
static
final
String
PREFIX
=
"nioMapped:"
;
static
final
String
PREFIX
=
"nioMapped:"
;
static
{
static
{
...
...
h2/src/test/org/h2/test/jdbcx/SimpleXid.java
浏览文件 @
3fb8c0f8
...
@@ -28,6 +28,11 @@ public class SimpleXid implements Xid {
...
@@ -28,6 +28,11 @@ public class SimpleXid implements Xid {
this
.
globalTransactionId
=
globalTransactionId
;
this
.
globalTransactionId
=
globalTransactionId
;
}
}
/**
* Create a new random xid.
*
* @return the new object
*/
public
static
SimpleXid
createRandom
()
{
public
static
SimpleXid
createRandom
()
{
int
formatId
=
next
.
getAndIncrement
();
int
formatId
=
next
.
getAndIncrement
();
byte
[]
bq
=
new
byte
[
MAXBQUALSIZE
];
byte
[]
bq
=
new
byte
[
MAXBQUALSIZE
];
...
...
h2/src/test/org/h2/test/jdbcx/TestXASimple.java
浏览文件 @
3fb8c0f8
...
@@ -106,7 +106,7 @@ public class TestXASimple extends TestBase {
...
@@ -106,7 +106,7 @@ public class TestXASimple extends TestBase {
JdbcUtils
.
closeSilently
(
conn
);
JdbcUtils
.
closeSilently
(
conn
);
}
}
p
ublic
void
testSimple
()
throws
SQLException
{
p
rivate
void
testSimple
()
throws
SQLException
{
deleteDb
(
"xaSimple1"
);
deleteDb
(
"xaSimple1"
);
deleteDb
(
"xaSimple2"
);
deleteDb
(
"xaSimple2"
);
...
...
h2/src/test/org/h2/test/server/WebClient.java
浏览文件 @
3fb8c0f8
...
@@ -49,6 +49,14 @@ public class WebClient {
...
@@ -49,6 +49,14 @@ public class WebClient {
return
result
;
return
result
;
}
}
/**
* Upload a file.
*
* @param url the target URL
* @param fileName the file name to post
* @param in the input stream
* @return the result
*/
String
upload
(
String
url
,
String
fileName
,
InputStream
in
)
throws
IOException
{
String
upload
(
String
url
,
String
fileName
,
InputStream
in
)
throws
IOException
{
HttpURLConnection
conn
=
(
HttpURLConnection
)
new
URL
(
url
).
openConnection
();
HttpURLConnection
conn
=
(
HttpURLConnection
)
new
URL
(
url
).
openConnection
();
conn
.
setDoOutput
(
true
);
conn
.
setDoOutput
(
true
);
...
@@ -127,6 +135,12 @@ public class WebClient {
...
@@ -127,6 +135,12 @@ public class WebClient {
return
get
(
url
);
return
get
(
url
);
}
}
/**
* Get the base URL (the host name and port).
*
* @param url the complete URL
* @return the host name and port
*/
String
getBaseUrl
(
String
url
)
{
String
getBaseUrl
(
String
url
)
{
int
idx
=
url
.
indexOf
(
"//"
);
int
idx
=
url
.
indexOf
(
"//"
);
idx
=
url
.
indexOf
(
"/"
,
idx
+
2
);
idx
=
url
.
indexOf
(
"/"
,
idx
+
2
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论