提交 3fb8c0f8 authored 作者: Thomas Mueller's avatar Thomas Mueller

Javadocs.

上级 c6d8fe4d
......@@ -151,6 +151,8 @@ class FileObjectMemoryData {
/**
* Update the last modified time.
*
* @param openReadOnly if the file was opened in read-only mode
*/
void touch(boolean openReadOnly) throws IOException {
if (isReadOnly || openReadOnly) {
......
......@@ -15,6 +15,9 @@ import java.io.InputStream;
*/
public class FileSystemDiskNio extends FileSystemDisk {
/**
* The prefix for the file system that uses java.nio.channels.FileChannel.
*/
static final String PREFIX = "nio:";
static {
......
......@@ -14,6 +14,9 @@ import java.io.IOException;
*/
public class FileSystemDiskNioMapped extends FileSystemDiskNio {
/**
* The prefix for the file system that uses memory mapped files.
*/
static final String PREFIX = "nioMapped:";
static {
......
......@@ -28,6 +28,11 @@ public class SimpleXid implements Xid {
this.globalTransactionId = globalTransactionId;
}
/**
* Create a new random xid.
*
* @return the new object
*/
public static SimpleXid createRandom() {
int formatId = next.getAndIncrement();
byte[] bq = new byte[MAXBQUALSIZE];
......
......@@ -106,7 +106,7 @@ public class TestXASimple extends TestBase {
JdbcUtils.closeSilently(conn);
}
public void testSimple() throws SQLException {
private void testSimple() throws SQLException {
deleteDb("xaSimple1");
deleteDb("xaSimple2");
......
......@@ -49,6 +49,14 @@ public class WebClient {
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 {
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setDoOutput(true);
......@@ -127,6 +135,12 @@ public class WebClient {
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) {
int idx = url.indexOf("//");
idx = url.indexOf("/", idx + 2);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论