• R/O
  • HTTP
  • SSH
  • HTTPS

bytom-java-sdk: Commit

Official Java SDK for Bytom


Commit MetaInfo

Révisiondc82daec414b98e3f687c1322689324a857ab11e (tree)
l'heure2019-03-21 18:18:18
Auteurshenao78 <shenao.78@163....>
Commitershenao78

Message de Log

adjust structure

Change Summary

Modification

--- a/java-sdk/src/main/java/io/bytom/api/AccessToken.java
+++ b/java-sdk/src/main/java/io/bytom/api/AccessToken.java
@@ -1,9 +1,9 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.ParameterizedTypeImpl;
5-import io.bytom.offline.common.Utils;
6-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.ParameterizedTypeImpl;
5+import io.bytom.common.Utils;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.apache.log4j.Logger;
99
--- a/java-sdk/src/main/java/io/bytom/api/Account.java
+++ b/java-sdk/src/main/java/io/bytom/api/Account.java
@@ -2,9 +2,9 @@ package io.bytom.api;
22
33 import com.google.gson.Gson;
44 import com.google.gson.annotations.SerializedName;
5-import io.bytom.offline.common.ParameterizedTypeImpl;
6-import io.bytom.offline.common.Utils;
7-import io.bytom.offline.exception.*;
5+import io.bytom.common.ParameterizedTypeImpl;
6+import io.bytom.common.Utils;
7+import io.bytom.exception.*;
88 import io.bytom.http.Client;
99 import org.apache.log4j.Logger;
1010
--- a/java-sdk/src/main/java/io/bytom/api/Asset.java
+++ b/java-sdk/src/main/java/io/bytom/api/Asset.java
@@ -1,9 +1,9 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.ParameterizedTypeImpl;
5-import io.bytom.offline.common.Utils;
6-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.ParameterizedTypeImpl;
5+import io.bytom.common.Utils;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.apache.log4j.Logger;
99
--- a/java-sdk/src/main/java/io/bytom/api/Balance.java
+++ b/java-sdk/src/main/java/io/bytom/api/Balance.java
@@ -1,9 +1,9 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.ParameterizedTypeImpl;
5-import io.bytom.offline.common.Utils;
6-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.ParameterizedTypeImpl;
5+import io.bytom.common.Utils;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.apache.log4j.Logger;
99
--- a/java-sdk/src/main/java/io/bytom/api/Block.java
+++ b/java-sdk/src/main/java/io/bytom/api/Block.java
@@ -1,8 +1,8 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.Utils;
5-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.Utils;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.apache.log4j.Logger;
88
--- a/java-sdk/src/main/java/io/bytom/api/CoreConfig.java
+++ b/java-sdk/src/main/java/io/bytom/api/CoreConfig.java
@@ -1,8 +1,8 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.Utils;
5-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.Utils;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.apache.log4j.Logger;
88
--- a/java-sdk/src/main/java/io/bytom/api/Key.java
+++ b/java-sdk/src/main/java/io/bytom/api/Key.java
@@ -1,9 +1,9 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.ParameterizedTypeImpl;
5-import io.bytom.offline.common.Utils;
6-import io.bytom.offline.exception.*;
4+import io.bytom.common.ParameterizedTypeImpl;
5+import io.bytom.common.Utils;
6+import io.bytom.exception.*;
77 import io.bytom.http.Client;
88 import org.apache.log4j.Logger;
99
--- a/java-sdk/src/main/java/io/bytom/api/Message.java
+++ b/java-sdk/src/main/java/io/bytom/api/Message.java
@@ -1,8 +1,8 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.Utils;
5-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.Utils;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.apache.log4j.Logger;
88
--- a/java-sdk/src/main/java/io/bytom/api/RawTransaction.java
+++ b/java-sdk/src/main/java/io/bytom/api/RawTransaction.java
@@ -1,8 +1,8 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.Utils;
5-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.Utils;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.apache.log4j.Logger;
88
--- a/java-sdk/src/main/java/io/bytom/api/Receiver.java
+++ b/java-sdk/src/main/java/io/bytom/api/Receiver.java
@@ -1,8 +1,8 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.Utils;
5-import io.bytom.offline.exception.JSONException;
4+import io.bytom.common.Utils;
5+import io.bytom.exception.JSONException;
66
77 /**
88 * Receivers are used to facilitate payments between accounts on different
--- a/java-sdk/src/main/java/io/bytom/api/Transaction.java
+++ b/java-sdk/src/main/java/io/bytom/api/Transaction.java
@@ -1,9 +1,9 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.ParameterizedTypeImpl;
5-import io.bytom.offline.common.Utils;
6-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.ParameterizedTypeImpl;
5+import io.bytom.common.Utils;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.apache.log4j.Logger;
99
--- a/java-sdk/src/main/java/io/bytom/api/UnconfirmedTransaction.java
+++ b/java-sdk/src/main/java/io/bytom/api/UnconfirmedTransaction.java
@@ -1,8 +1,8 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.Utils;
5-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.Utils;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.apache.log4j.Logger;
88
--- a/java-sdk/src/main/java/io/bytom/api/UnspentOutput.java
+++ b/java-sdk/src/main/java/io/bytom/api/UnspentOutput.java
@@ -1,9 +1,9 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.ParameterizedTypeImpl;
5-import io.bytom.offline.common.Utils;
6-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.ParameterizedTypeImpl;
5+import io.bytom.common.Utils;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.apache.log4j.Logger;
99
--- a/java-sdk/src/main/java/io/bytom/api/Wallet.java
+++ b/java-sdk/src/main/java/io/bytom/api/Wallet.java
@@ -1,8 +1,8 @@
11 package io.bytom.api;
22
33 import com.google.gson.annotations.SerializedName;
4-import io.bytom.offline.common.Utils;
5-import io.bytom.offline.exception.BytomException;
4+import io.bytom.common.Utils;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.apache.log4j.Logger;
88
--- a/java-sdk/src/main/java/io/bytom/offline/common/Configuration.java
+++ b/java-sdk/src/main/java/io/bytom/common/Configuration.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.common;
1+package io.bytom.common;
22
33 import java.io.FileNotFoundException;
44 import java.io.IOException;
--- a/java-sdk/src/main/java/io/bytom/offline/common/ParameterizedTypeImpl.java
+++ b/java-sdk/src/main/java/io/bytom/common/ParameterizedTypeImpl.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.common;
1+package io.bytom.common;
22
33 import java.lang.reflect.ParameterizedType;
44 import java.lang.reflect.Type;
--- a/java-sdk/src/main/java/io/bytom/offline/common/Utils.java
+++ b/java-sdk/src/main/java/io/bytom/common/Utils.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.common;
1+package io.bytom.common;
22
33 import com.google.gson.Gson;
44 import com.google.gson.GsonBuilder;
--- a/java-sdk/src/main/java/io/bytom/offline/exception/APIException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/APIException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 import com.google.gson.annotations.SerializedName;
44
--- a/java-sdk/src/main/java/io/bytom/offline/exception/BadURLException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/BadURLException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 /**
44 * BadURLException wraps errors due to malformed URLs.
--- a/java-sdk/src/main/java/io/bytom/offline/exception/BuildException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/BuildException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 import com.google.gson.annotations.SerializedName;
44
--- a/java-sdk/src/main/java/io/bytom/offline/exception/BytomException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/BytomException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 /**
44 * Base exception class for the Chain Core SDK.
--- a/java-sdk/src/main/java/io/bytom/offline/exception/ConfigurationException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/ConfigurationException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 /**
44 * ConfigurationException wraps errors during client configuration.
--- a/java-sdk/src/main/java/io/bytom/offline/exception/ConnectivityException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/ConnectivityException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 import com.squareup.okhttp.Response;
44
--- a/java-sdk/src/main/java/io/bytom/offline/exception/HTTPException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/HTTPException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 /**
44 * HTTPException wraps generic HTTP errors.
--- a/java-sdk/src/main/java/io/bytom/offline/exception/JSONException.java
+++ b/java-sdk/src/main/java/io/bytom/exception/JSONException.java
@@ -1,4 +1,4 @@
1-package io.bytom.offline.exception;
1+package io.bytom.exception;
22
33 /**
44 * JSONException wraps errors due to marshaling/unmarshaling json payloads.
--- a/java-sdk/src/main/java/io/bytom/http/BatchResponse.java
+++ b/java-sdk/src/main/java/io/bytom/http/BatchResponse.java
@@ -1,6 +1,6 @@
11 package io.bytom.http;
22
3-import io.bytom.offline.exception.*;
3+import io.bytom.exception.*;
44 import com.google.gson.Gson;
55 import com.google.gson.JsonArray;
66 import com.google.gson.JsonElement;
--- a/java-sdk/src/main/java/io/bytom/http/Client.java
+++ b/java-sdk/src/main/java/io/bytom/http/Client.java
@@ -2,8 +2,8 @@ package io.bytom.http;
22
33 import com.google.gson.JsonElement;
44 import com.google.gson.JsonParser;
5-import io.bytom.offline.common.*;
6-import io.bytom.offline.exception.*;
5+import io.bytom.common.*;
6+import io.bytom.exception.*;
77 import com.google.gson.Gson;
88 import com.squareup.okhttp.*;
99 import org.apache.log4j.Logger;
--- a/java-sdk/src/test/java/io/bytom/TestUtils.java
+++ b/java-sdk/src/test/java/io/bytom/TestUtils.java
@@ -1,7 +1,7 @@
11 package io.bytom;
22
3-import io.bytom.offline.common.Configuration;
4-import io.bytom.offline.exception.BytomException;
3+import io.bytom.common.Configuration;
4+import io.bytom.exception.BytomException;
55 import io.bytom.http.Client;
66 import org.apache.log4j.Logger;
77
--- a/java-sdk/src/test/java/io/bytom/integration/AccessTokenTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/AccessTokenTest.java
@@ -2,7 +2,7 @@ package io.bytom.integration;
22
33 import io.bytom.TestUtils;
44 import io.bytom.api.AccessToken;
5-import io.bytom.offline.exception.BytomException;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.junit.Test;
88
--- a/java-sdk/src/test/java/io/bytom/integration/BalanceTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/BalanceTest.java
@@ -3,7 +3,7 @@ package io.bytom.integration;
33 import io.bytom.TestUtils;
44 import io.bytom.api.Balance;
55 import io.bytom.api.Wallet;
6-import io.bytom.offline.exception.BytomException;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.apache.log4j.Logger;
99 import org.junit.Assert;
--- a/java-sdk/src/test/java/io/bytom/integration/BlockTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/BlockTest.java
@@ -4,7 +4,7 @@ import io.bytom.TestUtils;
44 import io.bytom.api.Asset;
55 import io.bytom.api.Block;
66 import io.bytom.api.Wallet;
7-import io.bytom.offline.exception.BytomException;
7+import io.bytom.exception.BytomException;
88 import io.bytom.http.Client;
99 import org.junit.Assert;
1010 import org.junit.Test;
--- a/java-sdk/src/test/java/io/bytom/integration/CoreConfigTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/CoreConfigTest.java
@@ -2,7 +2,7 @@ package io.bytom.integration;
22
33 import io.bytom.TestUtils;
44 import io.bytom.api.CoreConfig;
5-import io.bytom.offline.exception.BytomException;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.junit.Assert;
88 import org.junit.Test;
--- a/java-sdk/src/test/java/io/bytom/integration/KeyTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/KeyTest.java
@@ -2,7 +2,7 @@ package io.bytom.integration;
22
33 import io.bytom.TestUtils;
44 import io.bytom.api.Key;
5-import io.bytom.offline.exception.BytomException;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.junit.Test;
88
--- a/java-sdk/src/test/java/io/bytom/integration/MessageTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/MessageTest.java
@@ -2,7 +2,7 @@ package io.bytom.integration;
22
33 import io.bytom.TestUtils;
44 import io.bytom.api.Message;
5-import io.bytom.offline.exception.BytomException;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.junit.Assert;
88 import org.junit.Test;
--- a/java-sdk/src/test/java/io/bytom/integration/RawTransactionTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/RawTransactionTest.java
@@ -3,7 +3,7 @@ package io.bytom.integration;
33 import io.bytom.TestUtils;
44 import io.bytom.api.RawTransaction;
55 import io.bytom.api.Wallet;
6-import io.bytom.offline.exception.BytomException;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.junit.Assert;
99 import org.junit.Test;
--- a/java-sdk/src/test/java/io/bytom/integration/TransactionTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/TransactionTest.java
@@ -2,7 +2,7 @@ package io.bytom.integration;
22
33 import io.bytom.TestUtils;
44 import io.bytom.api.*;
5-import io.bytom.offline.exception.BytomException;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.apache.log4j.Logger;
88 import org.junit.Assert;
--- a/java-sdk/src/test/java/io/bytom/integration/UTXOTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/UTXOTest.java
@@ -2,7 +2,7 @@ package io.bytom.integration;
22
33 import io.bytom.TestUtils;
44 import io.bytom.api.UnspentOutput;
5-import io.bytom.offline.exception.BytomException;
5+import io.bytom.exception.BytomException;
66 import io.bytom.http.Client;
77 import org.junit.Assert;
88 import org.junit.Test;
--- a/java-sdk/src/test/java/io/bytom/integration/UnconfirmedTransactionTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/UnconfirmedTransactionTest.java
@@ -3,7 +3,7 @@ package io.bytom.integration;
33 import io.bytom.TestUtils;
44 import io.bytom.api.UnconfirmedTransaction;
55 import io.bytom.api.Wallet;
6-import io.bytom.offline.exception.BytomException;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.junit.Assert;
99 import org.junit.Test;
--- a/java-sdk/src/test/java/io/bytom/integration/WalletTest.java
+++ b/java-sdk/src/test/java/io/bytom/integration/WalletTest.java
@@ -3,7 +3,7 @@ package io.bytom.integration;
33 import io.bytom.TestUtils;
44 import io.bytom.api.Key;
55 import io.bytom.api.Wallet;
6-import io.bytom.offline.exception.BytomException;
6+import io.bytom.exception.BytomException;
77 import io.bytom.http.Client;
88 import org.junit.Test;
99
Afficher sur ancien navigateur de dépôt.