forked from docs/doc-exports
OBS JAVA SDK 0708 Version
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
This commit is contained in:
2775
docs/obs_3rd_party/java_sdk/ALL_META.TXT.json
vendored
Normal file
2775
docs/obs_3rd_party/java_sdk/ALL_META.TXT.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1316
docs/obs_3rd_party/java_sdk/CLASS.TXT.json
vendored
Normal file
1316
docs/obs_3rd_party/java_sdk/CLASS.TXT.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
docs/obs_3rd_party/java_sdk/PARAMETERS.txt
vendored
Normal file
3
docs/obs_3rd_party/java_sdk/PARAMETERS.txt
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
version=""
|
||||
language="en-us"
|
||||
type=""
|
||||
BIN
docs/obs_3rd_party/java_sdk/en-us_image_0000001580082852.png
vendored
Normal file
BIN
docs/obs_3rd_party/java_sdk/en-us_image_0000001580082852.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
BIN
docs/obs_3rd_party/java_sdk/en-us_image_0000001809221937.png
vendored
Normal file
BIN
docs/obs_3rd_party/java_sdk/en-us_image_0000001809221937.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
15
docs/obs_3rd_party/java_sdk/obs_21_0001.html
vendored
Normal file
15
docs/obs_3rd_party/java_sdk/obs_21_0001.html
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<a name="obs_21_0001"></a><a name="obs_21_0001"></a>
|
||||
|
||||
<h1 class="topictitle1">SDK Download and Installation</h1>
|
||||
<div id="body0000001622638404"><div class="section" id="obs_21_0001__section10285185142912"><a name="obs_21_0001__section10285185142912"></a><a name="section10285185142912"></a><h4 class="sectiontitle">Downloading OBS SDK for Java</h4><ul id="obs_21_0001__ul17831193115487"><li id="obs_21_0001__li1770717398511">Latest version of OBS Java SDK: <a href="https://github.com/opentelekomcloud-community/obs-java-sdk" target="_blank" rel="noopener noreferrer">Download</a></li></ul>
|
||||
</div>
|
||||
<div class="section" id="obs_21_0001__section133181813135117"><h4 class="sectiontitle">Compiling the Java Source Code</h4><p id="obs_21_0001__p12243133844412">You can download the source code of SDK for Java and compile the source code to create a JAR package. Before using this method, ensure that the Java and Maven environments are correctly configured and can be used properly.</p>
|
||||
<ol id="obs_21_0001__ol1524323818441"><li id="obs_21_0001__li16243193810446"><span>Download the source code by referring to <a href="#obs_21_0001__section10285185142912">Downloading OBS SDK for Java</a> and decompress it.</span></li><li id="obs_21_0001__li12243163820446"><span>Go to the directory where the source code is decompressed using commands.</span></li><li id="obs_21_0001__li1524303884415"><span>Run the following command:</span><p><div class="p" id="obs_21_0001__p16243638154417">Linux:<pre class="screen" id="obs_21_0001__screen824333818444">mvn clean package -Dmaven.test.skip=true -f pom-java.xml </pre>
|
||||
</div>
|
||||
<div class="p" id="obs_21_0001__p18243173820442">Windows:<pre class="screen" id="obs_21_0001__screen1724363884420">mvn clean package "-Dmaven.test.skip=true" -f pom-java.xml</pre>
|
||||
</div>
|
||||
</p></li><li id="obs_21_0001__li4243103818443"><span>Find the generated JAR package in the <strong id="obs_21_0001__b1611366749">target</strong> subdirectory of the decompressed directory.</span></li><li id="obs_21_0001__li16243133814412"><span>Save the JAR package to the dependency path of the local project.</span></li></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
|
||||
689
docs/obs_3rd_party/java_sdk/obs_21_0002.html
vendored
Normal file
689
docs/obs_3rd_party/java_sdk/obs_21_0002.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
663
docs/obs_3rd_party/java_sdk/obs_21_0100.html
vendored
Normal file
663
docs/obs_3rd_party/java_sdk/obs_21_0100.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
docs/obs_3rd_party/java_sdk/obs_21_0101.html
vendored
Normal file
10
docs/obs_3rd_party/java_sdk/obs_21_0101.html
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<a name="obs_21_0101"></a><a name="obs_21_0101"></a>
|
||||
|
||||
<h1 class="topictitle1">Before You Start</h1>
|
||||
<div id="body0000001670918449"><p id="obs_21_0101__p4829175282110">This section describes version compatibility and important notes about Object Storage Service (OBS) SDK for Java.</p>
|
||||
<div class="section" id="obs_21_0101__section87011823142810"><h4 class="sectiontitle">Compatibility</h4><ul id="obs_21_0101__ul193791251135212"><li id="obs_21_0101__li1081622113201">Recommended JDK versions: JDK 8 or later</li><li id="obs_21_0101__li18231104235819">Third-party dependencies: This version is not completely compatible with earlier versions (2.1.<em id="obs_21_0101__i96279938602426">x</em>). OkHttp 3 should be used to replace HttpClient4.<em id="obs_21_0101__i45391373332">x</em>.</li><li id="obs_21_0101__li12902751587">Namespace: This version is compatible with earlier versions (2.1.<em id="obs_21_0101__i165151588902426">x</em>). All external APIs are contained in the <strong id="obs_21_0101__b18384538102426">com.obs.services</strong>, <strong id="obs_21_0101__b103615192402426">com.obs.services.model</strong>, and <strong id="obs_21_0101__b189697504902426">com.obs.services.exception</strong> packages.</li><li id="obs_21_0101__li177341928635">API functions: This version is compatible with earlier versions (2.1.<em id="obs_21_0101__i77150860102426">x</em>).</li><li id="obs_21_0101__li18200848172814">The earlier 2.<em id="obs_21_0101__i139309710402426">X</em> versions are no longer maintained. You are advised to upgrade them to the latest version as soon as possible.</li></ul>
|
||||
</div>
|
||||
<div class="section" id="obs_21_0101__section1799812136145"><h4 class="sectiontitle">Important Notes</h4><ul id="obs_21_0101__ul13319854171617"><li id="obs_21_0101__li18696110191411">Make sure that you are familiar with OBS basic concepts in <a href="https://docs.otc.t-systems.com/en-us/usermanual/obs/en-us_topic_0045853692.html" target="_blank" rel="noopener noreferrer">Help Center</a>, such as buckets, objects, regions, and access keys (AKs/SKs).</li><li id="obs_21_0101__li263594285920">You can learn about how to call an API through the OBS SDK for Java by referring to <a href="obs_21_0100.html#obs_21_0100__section8686104202916">Using an OBS Client</a>.</li><li id="obs_21_0101__li97731558125912">After an API is called using an instance of <strong id="obs_21_0101__b188432503102426">ObsClient</strong>, if no exception is thrown, the return value is valid. If an exception is thrown, the operation fails. For details about errors, see <a href="obs_21_2005.html">SDK Exceptions</a>.</li><li id="obs_21_0101__li1670874119211">After an API is successfully called using an instance of <strong id="obs_21_0101__b199251111102426">ObsClient</strong>, a class or sub-class instance of <a href="obs_21_2003.html">HeaderResponse</a> that contains response headers will be returned.</li><li id="obs_21_0101__li1749173281310">Some features are available only in some regions. If an API call returns the 405 HTTP status code, check whether the region supports this feature. </li></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
19
docs/obs_3rd_party/java_sdk/obs_21_0102.html
vendored
Normal file
19
docs/obs_3rd_party/java_sdk/obs_21_0102.html
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<a name="obs_21_0102"></a><a name="obs_21_0102"></a>
|
||||
|
||||
<h1 class="topictitle1">Preparations</h1>
|
||||
<div id="body0000001622318536"><p id="obs_21_0102__p1451184762412">Before using OBS SDK for Java to access OBS, you need to prepare the service and development environments. To prepare the service environment, you will need an account and access keys. Both of them are necessary for interaction between OBS SDK and OBS. To ensure successful SDK installation and SDK-based code development and running, you should also set up a local development environment, for example, installing dependencies and development tools.</p>
|
||||
<div class="section" id="obs_21_0102__section458414452394"><h4 class="sectiontitle">Preparing Access Keys</h4><p id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_adeb035c840bc4ef48f20dad1b3cb6a5a">Access keys consist of two parts: an access key ID (AK) and a secret access key (SK). OBS uses access keys to sign requests to make sure that only authorized accounts can access specified OBS resources. Programmatic access must be enabled for an IAM user before the IAM user can get access keys. Access keys are explained as follows:</p>
|
||||
<ul id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_ud824bd53c08f4de298b5cae667f92384"><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_l3b5b9503106c49a8b5489ac8e11cb945">One AK maps to only one user but one user can have multiple AKs. OBS authenticates users by their AKs.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_lebae2a3195404969a625b86fe868e0fc">An SK is required for accessing OBS. Authentication information is generated based on the SK and request headers. AKs and SKs are in one-to-one match.</li></ul>
|
||||
<p id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_p948210412118">Access keys are classified into permanent access keys (AK/SK) and temporary access keys (AK/SK and security token). Each user can create at most two permanent access keys. Temporary access keys must be used within a given validity period. Once expired, they must be requested again. For security purposes, you are advised to use temporary access keys to access OBS. If you want to use permanent access keys, periodically update them. The following describes how to obtain two types of access keys.</p>
|
||||
<ul id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_ul9129162663715"><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li81311626163714">To get permanent access keys, do as follows:<ol id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_ol12129204810375"><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li131293485375">Log in to the management console.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li101298483377">In the upper right corner, hover over the username and choose <strong id="obs_21_0102__en-us_topic_0000001605096753_b17591164012493">My Credentials</strong>.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_en-us_topic_0142814371_li111081813183213">On the <strong id="obs_21_0102__en-us_topic_0000001605096753_b18139126115219">My Credentials</strong> page, click <strong id="obs_21_0102__en-us_topic_0000001605096753_b51407261528">Access Keys</strong> in the navigation pane.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_en-us_topic_0142814371_li875452123217">On the <strong id="obs_21_0102__en-us_topic_0000001605096753_b91191634165219">Access Keys</strong> page, click <strong id="obs_21_0102__en-us_topic_0000001605096753_b812013405217">Create Access Key</strong>.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li14130154815372">In the displayed dialog box, enter the login password and verification code.<div class="note" id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_ne3044baf037f4f74831f421bae0642f4"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_ub83092010ba24ab3a97c3a6bb6843b49"><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_l867bd009af974128bdc09dc992a337c4">If you have not bound an email address or a mobile number yet, only the login password is required.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_l120dd294d40949828d8aba973cabbce9">If you have bound both an email address and a mobile number, you can use either of them for verification.</li></ul>
|
||||
</div></div>
|
||||
</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li51308480374">Click <strong id="obs_21_0102__en-us_topic_0000001605096753_b697654110536">OK</strong>.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li111301648153720">Click <strong id="obs_21_0102__en-us_topic_0000001605096753_b27871448155318">Download</strong>. The access key file is automatically saved to your browser's default download path.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li121309481375">Open the downloaded <strong id="obs_21_0102__en-us_topic_0000001605096753_b147765975617">credentials.csv</strong> file to obtain the access keys (AK and SK).<div class="note" id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_n4cf417b871b6496c9448eb3f8dfc9f60"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_u72ac6ae546604f27b36f81aa196f3784"><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_lae8640b2fda847399d8689ba5eba3b14">Each user can create a maximum of two valid access key pairs.</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_l877538a6162b4fbcbd62b302a07ade4a">Keep AKs and SKs properly to prevent information leakage. If you click <strong id="obs_21_0102__en-us_topic_0000001605096753_b39111215216">Cancel</strong> in the download dialog box, the access keys will not be downloaded and cannot be downloaded later. You can create a new AK/SK pair if needed.</li></ul>
|
||||
</div></div>
|
||||
</li></ol>
|
||||
</li><li id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li188121361385">To get temporary access keys, refer to the following:<p id="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_p1387017162467"><a name="obs_21_0102__en-us_topic_0000001605096753_en-us_topic_0000001526886348_li188121361385"></a><a name="en-us_topic_0000001605096753_en-us_topic_0000001526886348_li188121361385"></a>Temporary access keys are issued by the system and are only valid for 15 minutes to 24 hours. Once expired, they must be requested again. They follow the principle of least privilege. When a temporary AK/SK pair is used for authentication, a security token must be used at the same time.</p>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="obs_21_0102__section19499111413511"><h4 class="sectiontitle">Setting Up a Development Environment</h4><ul id="obs_21_0102__ul1053982918378"><li id="obs_21_0102__li16149191425115">Download a recommended version of JDK from the <a href="https://www.oracle.com/java/technologies/downloads/" target="_blank" rel="noopener noreferrer">Oracle's official website</a> and install it. Recommended JDK versions: JDK 8 or later</li><li id="obs_21_0102__li128471731123715">The latest version of Eclipse IDE for Java Developers is required and can be downloaded from the <a href="http://www.eclipse.org/downloads/eclipse-packages/" target="_blank" rel="noopener noreferrer">Eclipse's official website</a>.</li></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
15
docs/obs_3rd_party/java_sdk/obs_21_0200.html
vendored
Normal file
15
docs/obs_3rd_party/java_sdk/obs_21_0200.html
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<a name="obs_21_0200"></a><a name="obs_21_0200"></a>
|
||||
|
||||
<h1 class="topictitle1">Initialization</h1>
|
||||
<div id="body0000001790497257"></div>
|
||||
<div>
|
||||
<ul class="ullinks">
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0201.html">Overview</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0202.html">Creating and Configuring an OBS Client</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0204.html">Configuring SDK Logging</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
65
docs/obs_3rd_party/java_sdk/obs_21_0201.html
vendored
Normal file
65
docs/obs_3rd_party/java_sdk/obs_21_0201.html
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
<a name="obs_21_0201"></a><a name="obs_21_0201"></a>
|
||||
|
||||
<h1 class="topictitle1">Overview</h1>
|
||||
<div id="body0000001743418352"><p id="obs_21_0201__p1880299143912">After the SDK is installed, you need to create and configure an OBS client and configure the logging for the SDK to complete the initialization.</p>
|
||||
|
||||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_21_0201__table11423759173711" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Initialization</caption><thead align="left"><tr id="obs_21_0201__row1442305903717"><th align="left" class="cellrowborder" valign="top" width="10.921092109210921%" id="mcps1.3.2.2.5.1.1"><p id="obs_21_0201__p1542313590376"><strong id="obs_21_0201__b1348716292393">Task</strong></p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="13.321332133213323%" id="mcps1.3.2.2.5.1.2"><p id="obs_21_0201__p1693217425918"><strong id="obs_21_0201__b1568294954112">Sub-task</strong></p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="5.690569056905691%" id="mcps1.3.2.2.5.1.3"><p id="obs_21_0201__p1589810355594"><strong id="obs_21_0201__b1620817424594">Mandatory (Yes/No)</strong></p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="70.06700670067006%" id="mcps1.3.2.2.5.1.4"><p id="obs_21_0201__p15423135914376"><strong id="obs_21_0201__b184419312419">Description</strong></p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="obs_21_0201__row16423135918379"><td class="cellrowborder" rowspan="3" valign="top" width="10.921092109210921%" headers="mcps1.3.2.2.5.1.1 "><p id="obs_21_0201__p124235595370"><a href="obs_21_0202.html">Creating and Configuring an OBS Client</a></p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="13.321332133213323%" headers="mcps1.3.2.2.5.1.2 "><p id="obs_21_0201__p1193212425914">Creating an OBS client</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="5.690569056905691%" headers="mcps1.3.2.2.5.1.3 "><p id="obs_21_0201__p989883555920">Yes</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="70.06700670067006%" headers="mcps1.3.2.2.5.1.4 "><p id="obs_21_0201__p199505597213">OBS clients offer a series of APIs for you to use OBS SDK for Java to interact with OBS. Before sending a request to OBS, you need to create and initialize an OBS client (an ObsClient instance).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0201__row3421718805"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="obs_21_0201__p11421018607">Configuring access credentials</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="obs_21_0201__p124211181505">Yes</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="obs_21_0201__p1190818285110">For security purposes, you need to configure access credentials for the client so that the server can verify the validity of requests.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0201__row196196265016"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="obs_21_0201__p96201526808">Configuring the endpoint and other parameters</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="obs_21_0201__p1862013261300">Yes for the endpoint; No for other parameters</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><ul id="obs_21_0201__ul25921253391"><li id="obs_21_0201__li195921225123913">To quickly create and retrieve your resources, you need to configure an endpoint for the client so that the server can know where to create or retrieve resources.</li><li id="obs_21_0201__li1759252512391">You can configure other parameters for the client based on your needs.</li></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0201__row19423259113715"><td class="cellrowborder" rowspan="2" valign="top" width="10.921092109210921%" headers="mcps1.3.2.2.5.1.1 "><p id="obs_21_0201__p442335923720"><a href="obs_21_0204.html">Configuring SDK Logging</a></p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="13.321332133213323%" headers="mcps1.3.2.2.5.1.2 "><p id="obs_21_0201__p893214412599">Configuring a log level</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="5.690569056905691%" headers="mcps1.3.2.2.5.1.3 "><p id="obs_21_0201__p198984353594">No</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="70.06700670067006%" headers="mcps1.3.2.2.5.1.4 "><p id="obs_21_0201__p084117591551">OBS SDK for Java offers logging based on the open-source library of Apache Log4j 2. The Log4j 2 framework classifies log files into different levels based on their priorities. You can specify a log level to customize the log storage scope.</p>
|
||||
<p id="obs_21_0201__p17423195915378">By default, OBS SDK for Java saves log files of the WARN and higher levels to local directories.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0201__row79022236314"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="obs_21_0201__p29021323139">Configuring a storage path for log files</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="obs_21_0201__p99026231638">No</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.3 "><p id="obs_21_0201__p43194239719">Configure a local path to store logs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_21_0200.html">Initialization</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
737
docs/obs_3rd_party/java_sdk/obs_21_0202.html
vendored
Normal file
737
docs/obs_3rd_party/java_sdk/obs_21_0202.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15
docs/obs_3rd_party/java_sdk/obs_21_0204.html
vendored
Normal file
15
docs/obs_3rd_party/java_sdk/obs_21_0204.html
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<a name="obs_21_0204"></a><a name="obs_21_0204"></a>
|
||||
|
||||
<h1 class="topictitle1">Configuring SDK Logging</h1>
|
||||
<div id="body0000001790518813"><p id="obs_21_0204__p142113409545">OBS SDK for Java offers logging based on the open-source Apache Log4j 2 library. By default, the SDK stores WARN log files to the directory specified by the JDK system variable <strong id="obs_21_0204__b197417589235030">user.dir</strong>. You can modify the log configuration file based on your needs.</p>
|
||||
<div class="section" id="obs_21_0204__section415935125410"><h4 class="sectiontitle">Procedure</h4><ol id="obs_21_0204__ol175970537230"><li id="obs_21_0204__li1059711535235"><span>Obtain the file <strong id="obs_21_0204__b127224467135030">log4j2.xml</strong> from the OBS SDK for Java package.</span></li><li id="obs_21_0204__li29531376536"><span>Modify the log level and storage path in the file as required.</span></li><li id="obs_21_0204__li8683212122511"><span>Save the file to the <strong id="obs_21_0204__b87812723835030">classpath</strong> root directory, or call <strong id="obs_21_0204__b109342993835030">Log4j2Configurator.setLogConfig</strong> to specify the storage path of the file.</span></li></ol>
|
||||
</div>
|
||||
<div class="note" id="obs_21_0204__note1911620337524"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_21_0204__ul2026392812218"><li id="obs_21_0204__li1426313281219">For details about SDK logging, see <a href="obs_21_2004.html">Log Analysis</a>.</li><li id="obs_21_0204__li58681230928">You can modify the <strong id="obs_21_0204__b50108136635030">log4j2.xml</strong> file to configure access permissions for log files.</li></ul>
|
||||
</div></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_21_0200.html">Initialization</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
15
docs/obs_3rd_party/java_sdk/obs_21_0300.html
vendored
Normal file
15
docs/obs_3rd_party/java_sdk/obs_21_0300.html
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<a name="obs_21_0300"></a><a name="obs_21_0300"></a>
|
||||
|
||||
<h1 class="topictitle1">Fault Locating</h1>
|
||||
<div id="body1563439334658"></div>
|
||||
<div>
|
||||
<ul class="ullinks">
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0301.html">Methods</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0303.html">Resolving Dependency Missing or Conflicts</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0302.html">Other Notable Issues</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
63
docs/obs_3rd_party/java_sdk/obs_21_0301.html
vendored
Normal file
63
docs/obs_3rd_party/java_sdk/obs_21_0301.html
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
<a name="obs_21_0301"></a><a name="obs_21_0301"></a>
|
||||
|
||||
<h1 class="topictitle1">Methods</h1>
|
||||
<div id="body1563499629448"><p id="obs_21_0301__p8060118">If problems occur when using the OBS Java SDK, you can perform the following steps to analyze and locate the problems.</p>
|
||||
<ol id="obs_21_0301__ol980003504413"><li id="obs_21_0301__li913816614581"><span>Make sure that of OBS Java SDK is used.</span></li><li id="obs_21_0301__li10541183816017"><span>Make sure that the logging function of OBS Java SDK is enabled. For details about how to enable the function, see the <a href="obs_21_2004.html">Log Analysis</a> section. The recommended log level is WARN.</span></li><li id="obs_21_0301__li88011355446"><span>Make sure that the program code of the OBS Java SDK complies with <a href="obs_21_0100.html#obs_21_0100__section8686104202916">Using an OBS Client</a>. All call exceptions of ObsClient APIs are processed as required. The following is a code example of uploading an object:</span><p><div class="codecoloring" codetype="Java" id="obs_21_0301__screen1384217274543"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
||||
<span class="normal"> 2</span>
|
||||
<span class="normal"> 3</span>
|
||||
<span class="normal"> 4</span>
|
||||
<span class="normal"> 5</span>
|
||||
<span class="normal"> 6</span>
|
||||
<span class="normal"> 7</span>
|
||||
<span class="normal"> 8</span>
|
||||
<span class="normal"> 9</span>
|
||||
<span class="normal">10</span>
|
||||
<span class="normal">11</span>
|
||||
<span class="normal">12</span>
|
||||
<span class="normal">13</span>
|
||||
<span class="normal">14</span>
|
||||
<span class="normal">15</span>
|
||||
<span class="normal">16</span>
|
||||
<span class="normal">17</span>
|
||||
<span class="normal">18</span>
|
||||
<span class="normal">19</span>
|
||||
<span class="normal">20</span>
|
||||
<span class="normal">21</span>
|
||||
<span class="normal">22</span>
|
||||
<span class="normal">23</span>
|
||||
<span class="normal">24</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">ObsClient</span><span class="w"> </span><span class="n">obsClient</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">null</span><span class="p">;</span><span class="w"> </span>
|
||||
<span class="k">try</span>
|
||||
<span class="p">{</span>
|
||||
<span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">endPoint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"https://your-endpoint"</span><span class="p">;</span>
|
||||
<span class="w"> </span><span class="c1">// Hard-coded or plaintext AK/SK are risky. For security purposes, encrypt your AK/SK and store them in the configuration file or environment variables. In this example, the AK/SK are stored in environment variables for identity authentication. Before running this example, configure environment variables ACCESS_KEY_ID and SECRET_ACCESS_KEY_ID.</span>
|
||||
<span class="w"> </span><span class="c1">// Obtain an AK/SK pair on the management console.</span>
|
||||
<span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">ak</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getenv</span><span class="p">(</span><span class="s">"ACCESS_KEY_ID"</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">sk</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getenv</span><span class="p">(</span><span class="s">"SECRET_ACCESS_KEY_ID"</span><span class="p">);</span>
|
||||
|
||||
<span class="w"> </span><span class="n">obsClient</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ObsClient</span><span class="p">(</span><span class="n">ak</span><span class="p">,</span><span class="w"> </span><span class="n">sk</span><span class="p">,</span><span class="w"> </span><span class="n">endPoint</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="n">HeaderResponse</span><span class="w"> </span><span class="n">response</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">obsClient</span><span class="p">.</span><span class="na">putObject</span><span class="p">(</span><span class="s">"bucketname"</span><span class="p">,</span><span class="w"> </span><span class="s">"objectname"</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayInputStream</span><span class="p">(</span><span class="s">"Hello OBS"</span><span class="p">.</span><span class="na">getBytes</span><span class="p">()));</span><span class="w"> </span>
|
||||
<span class="w"> </span><span class="c1">// (Optional) If a call is successful, record the HTTP status code and request ID returned by the server.</span>
|
||||
<span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">response</span><span class="p">.</span><span class="na">getStatusCode</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">response</span><span class="p">.</span><span class="na">getRequestId</span><span class="p">());</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">ObsException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="w"> </span><span class="c1">// Recommended: When an exception occurs, record the HTTP status code, server-side error code, and request ID returned by the server.</span>
|
||||
<span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">"HTTP Code: "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">e</span><span class="p">.</span><span class="na">getResponseCode</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">"Error Code:"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">e</span><span class="p">.</span><span class="na">getErrorCode</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">"Request ID:"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">e</span><span class="p">.</span><span class="na">getErrorRequestId</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="c1">// Recommended: When an exception occurs, record the stack information.</span>
|
||||
<span class="w"> </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">(</span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div></td></tr></table></div>
|
||||
</div>
|
||||
<div class="note" id="obs_21_0301__note24731139124211"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_21_0301__p174741239114212">You can click <a href="obs_21_2005.html">here</a> to view the details about <strong id="obs_21_0301__b1647010447317">ObsException</strong>.</p>
|
||||
</div></div>
|
||||
</p></li><li id="obs_21_0301__li19129141019548"><span>If an exception occurs when an ObsClient API is called, obtain the <a href="obs_21_2001.html">HTTP status code</a> and <a href="obs_21_2002.html">OBS server-side error code</a> from <strong id="obs_21_0301__b18316255163920">ObsException</strong> or log file, and compare them to locate the exception cause.</span></li><li id="obs_21_0301__li8659839104510"><span>If the exception cause cannot be found in step 4, obtain the request ID returned by the OBS server from <strong id="obs_21_0301__b1758415322114">ObsException</strong> or log file and contact the OBS server O&M team to locate the cause.</span></li><li id="obs_21_0301__li543962172517"><span>If the request ID is unable to be obtained, collect the stack information of <strong id="obs_21_0301__b154888221452">ObsException</strong> and contact the OBS client O&M team to locate the cause.</span></li></ol>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_21_0300.html">Fault Locating</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
196
docs/obs_3rd_party/java_sdk/obs_21_0302.html
vendored
Normal file
196
docs/obs_3rd_party/java_sdk/obs_21_0302.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
69
docs/obs_3rd_party/java_sdk/obs_21_0303.html
vendored
Normal file
69
docs/obs_3rd_party/java_sdk/obs_21_0303.html
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
<a name="obs_21_0303"></a><a name="obs_21_0303"></a>
|
||||
|
||||
<h1 class="topictitle1">Resolving Dependency Missing or Conflicts</h1>
|
||||
<div id="body0000001124390666"><p id="obs_21_0303__p20241377403">Dependency missing and dependency conflict are commonly encountered in Java development or during SDK integration. If error message "ClassNotFoundException" or "NoClassDefFoundError" is reported during application compilation and running, check whether this is a dependency-triggered problem. If yes, perform the following steps to locate and rectify the fault.</p>
|
||||
<div class="section" id="obs_21_0303__section1168245414421"><h4 class="sectiontitle">Dependency Missing</h4><p id="obs_21_0303__p19914012434">The following table lists the third-party components (including their versions) that the latest SDK depends on.</p>
|
||||
</div>
|
||||
|
||||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_21_0303__table612915234213" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_21_0303__row713082312216"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.1.4.1.1"><p id="obs_21_0303__p19130202313215">Dependency</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="29.92299229922992%" id="mcps1.3.3.1.4.1.2"><p id="obs_21_0303__p161303231213">Version</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="36.743674367436746%" id="mcps1.3.3.1.4.1.3"><p id="obs_21_0303__p18130323172111">Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="obs_21_0303__row131301423142115"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.1.4.1.1 "><p id="obs_21_0303__p1913092315218">okhttp</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="29.92299229922992%" headers="mcps1.3.3.1.4.1.2 "><p id="obs_21_0303__p31301223162110">4.11.0</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="36.743674367436746%" headers="mcps1.3.3.1.4.1.3 "><p id="obs_21_0303__p2130223162115">Used to send HTTP requests.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0303__row10130132312115"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.1.4.1.1 "><p id="obs_21_0303__p19130223202110">okio</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="29.92299229922992%" headers="mcps1.3.3.1.4.1.2 "><p id="obs_21_0303__p7130142392110">3.5.0</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="36.743674367436746%" headers="mcps1.3.3.1.4.1.3 "><p id="obs_21_0303__p10130123192112">Component of OkHttp</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0303__row13383104818301"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.1.4.1.1 "><p id="obs_21_0303__p10383104815307">java-xmlbuilder</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="29.92299229922992%" headers="mcps1.3.3.1.4.1.2 "><p id="obs_21_0303__p63841848123018">1.3</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="36.743674367436746%" headers="mcps1.3.3.1.4.1.3 "><p id="obs_21_0303__p1384348153018">Used to construct and parse XML files.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0303__row1150854673118"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.1.4.1.1 "><p id="obs_21_0303__p1850814617312">jackson-core</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="29.92299229922992%" headers="mcps1.3.3.1.4.1.2 "><p id="obs_21_0303__p8508246163116">2.13.3</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="36.743674367436746%" headers="mcps1.3.3.1.4.1.3 "><p id="obs_21_0303__p115081846183120">Used to construct and parse JSON files.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0303__row0416181014322"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.1.4.1.1 "><p id="obs_21_0303__p164161410113217">jackson-databind</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="29.92299229922992%" headers="mcps1.3.3.1.4.1.2 "><p id="obs_21_0303__p10554102633218">2.15.0</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="36.743674367436746%" headers="mcps1.3.3.1.4.1.3 "><p id="obs_21_0303__p941615108324">Component of jackson-core</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_21_0303__row196186177323"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.1.4.1.1 "><p id="obs_21_0303__p4618181743215">jackson-annotations</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="29.92299229922992%" headers="mcps1.3.3.1.4.1.2 "><p id="obs_21_0303__p35631026133211">2.13.3</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="36.743674367436746%" headers="mcps1.3.3.1.4.1.3 "><p id="obs_21_0303__p26186174322">Component of jackson-core</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="obs_21_0303__section09819387016"><h4 class="sectiontitle">Dependency Conflict</h4><p id="obs_21_0303__p19291164414015">If your project has multiple versions of OBS Java SDK packages or third-party dependencies, dependency conflicts may occur. If there are SDKs of earlier versions, delete them and use the latest version. If there are multiple versions of third-party dependencies, replace the conflict ones with the versions required by the SDK.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_21_0300.html">Fault Locating</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
43
docs/obs_3rd_party/java_sdk/obs_21_0400.html
vendored
Normal file
43
docs/obs_3rd_party/java_sdk/obs_21_0400.html
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<a name="obs_21_0400"></a><a name="obs_21_0400"></a>
|
||||
|
||||
<h1 class="topictitle1">Bucket Management</h1>
|
||||
<div id="body1502764180078"></div>
|
||||
<div>
|
||||
<ul class="ullinks">
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0401.html">Creating a Bucket</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0402.html">Obtaining a Bucket List</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0403.html">Deleting a Bucket</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0404.html">Checking Whether a Bucket Exists</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0405.html">Obtaining Bucket Metadata</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0406.html">Setting a Bucket ACL</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0412.html">Obtaining a Bucket ACL</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0407.html">Configuring a Bucket Policy</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0413.html">Obtaining the Policy of a Bucket</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0414.html">Deleting a Bucket Policy</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0408.html">Obtaining the Region of a Bucket</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0409.html">Obtaining Storage Information of a Bucket</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0410.html">Configuring a Storage Quota</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0415.html">Obtaining a Bucket Storage Quota</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0411.html">Configuring a Storage Class for a Bucket</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0416.html">Obtaining the Storage Class of a Bucket</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0421.html">Bucket Inventory</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
925
docs/obs_3rd_party/java_sdk/obs_21_0401.html
vendored
Normal file
925
docs/obs_3rd_party/java_sdk/obs_21_0401.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
726
docs/obs_3rd_party/java_sdk/obs_21_0402.html
vendored
Normal file
726
docs/obs_3rd_party/java_sdk/obs_21_0402.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
183
docs/obs_3rd_party/java_sdk/obs_21_0403.html
vendored
Normal file
183
docs/obs_3rd_party/java_sdk/obs_21_0403.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
165
docs/obs_3rd_party/java_sdk/obs_21_0404.html
vendored
Normal file
165
docs/obs_3rd_party/java_sdk/obs_21_0404.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
404
docs/obs_3rd_party/java_sdk/obs_21_0405.html
vendored
Normal file
404
docs/obs_3rd_party/java_sdk/obs_21_0405.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
927
docs/obs_3rd_party/java_sdk/obs_21_0406.html
vendored
Normal file
927
docs/obs_3rd_party/java_sdk/obs_21_0406.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
204
docs/obs_3rd_party/java_sdk/obs_21_0407.html
vendored
Normal file
204
docs/obs_3rd_party/java_sdk/obs_21_0407.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
190
docs/obs_3rd_party/java_sdk/obs_21_0408.html
vendored
Normal file
190
docs/obs_3rd_party/java_sdk/obs_21_0408.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
208
docs/obs_3rd_party/java_sdk/obs_21_0409.html
vendored
Normal file
208
docs/obs_3rd_party/java_sdk/obs_21_0409.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
227
docs/obs_3rd_party/java_sdk/obs_21_0410.html
vendored
Normal file
227
docs/obs_3rd_party/java_sdk/obs_21_0410.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
309
docs/obs_3rd_party/java_sdk/obs_21_0411.html
vendored
Normal file
309
docs/obs_3rd_party/java_sdk/obs_21_0411.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
457
docs/obs_3rd_party/java_sdk/obs_21_0412.html
vendored
Normal file
457
docs/obs_3rd_party/java_sdk/obs_21_0412.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
168
docs/obs_3rd_party/java_sdk/obs_21_0413.html
vendored
Normal file
168
docs/obs_3rd_party/java_sdk/obs_21_0413.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
175
docs/obs_3rd_party/java_sdk/obs_21_0414.html
vendored
Normal file
175
docs/obs_3rd_party/java_sdk/obs_21_0414.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
176
docs/obs_3rd_party/java_sdk/obs_21_0415.html
vendored
Normal file
176
docs/obs_3rd_party/java_sdk/obs_21_0415.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
202
docs/obs_3rd_party/java_sdk/obs_21_0416.html
vendored
Normal file
202
docs/obs_3rd_party/java_sdk/obs_21_0416.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
405
docs/obs_3rd_party/java_sdk/obs_21_0417.html
vendored
Normal file
405
docs/obs_3rd_party/java_sdk/obs_21_0417.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
389
docs/obs_3rd_party/java_sdk/obs_21_0418.html
vendored
Normal file
389
docs/obs_3rd_party/java_sdk/obs_21_0418.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
377
docs/obs_3rd_party/java_sdk/obs_21_0419.html
vendored
Normal file
377
docs/obs_3rd_party/java_sdk/obs_21_0419.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
208
docs/obs_3rd_party/java_sdk/obs_21_0420.html
vendored
Normal file
208
docs/obs_3rd_party/java_sdk/obs_21_0420.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
docs/obs_3rd_party/java_sdk/obs_21_0421.html
vendored
Normal file
21
docs/obs_3rd_party/java_sdk/obs_21_0421.html
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<a name="obs_21_0421"></a><a name="obs_21_0421"></a>
|
||||
|
||||
<h1 class="topictitle1">Bucket Inventory</h1>
|
||||
<div id="body0000001667441764"></div>
|
||||
<div>
|
||||
<ul class="ullinks">
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0417.html">Configuring an Inventory Rule</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0418.html">Obtaining an Inventory Rule</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0419.html">Listing Inventory Rules</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0420.html">Deleting an Inventory Rule</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_21_0400.html">Bucket Management</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
31
docs/obs_3rd_party/java_sdk/obs_21_0600.html
vendored
Normal file
31
docs/obs_3rd_party/java_sdk/obs_21_0600.html
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
<a name="obs_21_0600"></a><a name="obs_21_0600"></a>
|
||||
|
||||
<h1 class="topictitle1">Object Upload</h1>
|
||||
<div id="body1502764180079"></div>
|
||||
<div>
|
||||
<ul class="ullinks">
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0601.html">Overview</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0602.html">Uploading an Object - Streaming</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0603.html">Uploading an Object - File-Based</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0604.html">Obtaining the Upload Progress</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0605.html">Creating a Folder</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0606.html">Configuring Object Metadata</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0607.html">Multipart Upload</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0608.html">Configuring Lifecycle Rules</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0609.html">Uploading an Object - Append</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0611.html">Uploading an Object - Resumable</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0612.html">Uploading an Object - Browser-Based</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
14
docs/obs_3rd_party/java_sdk/obs_21_0601.html
vendored
Normal file
14
docs/obs_3rd_party/java_sdk/obs_21_0601.html
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<a name="obs_21_0601"></a><a name="obs_21_0601"></a>
|
||||
|
||||
<h1 class="topictitle1">Overview</h1>
|
||||
<div id="body1540262171997"><p id="obs_21_0601__p79816111572">In OBS, objects are basic data units that users can perform operations on. OBS Java SDK provides abundant APIs for object upload in the following methods:</p>
|
||||
<ul id="obs_21_0601__ul79817115575"><li id="obs_21_0601__li179817113578"><a href="obs_21_0602.html">Streaming</a></li><li id="obs_21_0601__li19821165717"><a href="obs_21_0603.html">File-based</a></li><li id="obs_21_0601__li1798511185716"><a href="obs_21_0607.html">Multipart</a></li><li id="obs_21_0601__li139721847219"><a href="obs_21_0609.html">Appendable</a></li><li id="obs_21_0601__li14795152517566"><a href="obs_21_0611.html">Resumable</a></li><li id="obs_21_0601__li498191110578"><a href="obs_21_0612.html">Browser-based</a></li></ul>
|
||||
<p id="obs_21_0601__p39817115575">The SDK supports the upload of objects whose size ranges from 0 KB to 5 GB. For streaming upload, appendable upload, and file-based upload, data to be uploaded cannot be larger than 5 GB. If the file is larger than 5 GB, multipart upload (where each part is smaller than 5 GB) is suitable. Browser-based upload allows files to be uploaded through a browser.</p>
|
||||
<p id="obs_21_0601__p444918351812">If you grant anonymous users the read permission for an object during the upload, anonymous users can access the object through a URL after the upload is complete. The object URL is in the format of <strong id="obs_21_0601__b318011421812">https://</strong><strong id="obs_21_0601__b31836422812"><em id="obs_21_0601__i318284215814">bucket name</em></strong><strong id="obs_21_0601__b1318564214818">.</strong><strong id="obs_21_0601__b171881242984"><em id="obs_21_0601__i1718614428816">domain name</em></strong><strong id="obs_21_0601__b31900421812">/</strong><strong id="obs_21_0601__b171921342588"><em id="obs_21_0601__i219124218810">directory level</em></strong><strong id="obs_21_0601__b19194742684">/</strong><strong id="obs_21_0601__b1219610421487"><em id="obs_21_0601__i51952423814">object name</em></strong>. If the object resides in the root directory of the bucket, its URL does not contain directory levels.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_21_0600.html">Object Upload</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
1525
docs/obs_3rd_party/java_sdk/obs_21_0602.html
vendored
Normal file
1525
docs/obs_3rd_party/java_sdk/obs_21_0602.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1322
docs/obs_3rd_party/java_sdk/obs_21_0603.html
vendored
Normal file
1322
docs/obs_3rd_party/java_sdk/obs_21_0603.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
343
docs/obs_3rd_party/java_sdk/obs_21_0604.html
vendored
Normal file
343
docs/obs_3rd_party/java_sdk/obs_21_0604.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1317
docs/obs_3rd_party/java_sdk/obs_21_0605.html
vendored
Normal file
1317
docs/obs_3rd_party/java_sdk/obs_21_0605.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1738
docs/obs_3rd_party/java_sdk/obs_21_0606.html
vendored
Normal file
1738
docs/obs_3rd_party/java_sdk/obs_21_0606.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
29
docs/obs_3rd_party/java_sdk/obs_21_0607.html
vendored
Normal file
29
docs/obs_3rd_party/java_sdk/obs_21_0607.html
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<a name="obs_21_0607"></a><a name="obs_21_0607"></a>
|
||||
|
||||
<h1 class="topictitle1">Multipart Upload</h1>
|
||||
<div id="body0000001579380334"></div>
|
||||
<div>
|
||||
<ul class="ullinks">
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0614.html">Multipart Upload Overview</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0615.html">Initiating a Multipart Upload</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0616.html">Uploading a Part</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0617.html">Assembling Parts</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0618.html">Code Example of a Multipart Upload</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0619.html">Aborting a Multipart Upload</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0620.html">Listing Uploaded Parts</a></strong><br>
|
||||
</li>
|
||||
<li class="ulchildlink"><strong><a href="obs_21_0621.html">Listing Multipart Uploads</a></strong><br>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_21_0600.html">Object Upload</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
1326
docs/obs_3rd_party/java_sdk/obs_21_0608.html
vendored
Normal file
1326
docs/obs_3rd_party/java_sdk/obs_21_0608.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1346
docs/obs_3rd_party/java_sdk/obs_21_0609.html
vendored
Normal file
1346
docs/obs_3rd_party/java_sdk/obs_21_0609.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user