@@ -64,11 +64,12 @@ abstract class BaseAPIClient {
64
64
65
65
/**
66
66
* Algolia Search initialization
67
+ *
67
68
* @param applicationID the application ID you have in your admin interface
68
- * @param apiKey a valid API key for the service
69
- * @param hostsArray the list of hosts that you have received for the service
70
- * @param enableDsn set to true if your account has the Distributed Search Option
71
- * @param dsnHost override the automatic computation of dsn hostname
69
+ * @param apiKey a valid API key for the service
70
+ * @param hostsArray the list of hosts that you have received for the service
71
+ * @param enableDsn set to true if your account has the Distributed Search Option
72
+ * @param dsnHost override the automatic computation of dsn hostname
72
73
*/
73
74
protected BaseAPIClient (String applicationID , String apiKey , List <String > hostsArray , boolean enableDsn , String dsnHost ) {
74
75
if (applicationID == null || applicationID .length () == 0 ) {
@@ -103,8 +104,9 @@ public void setExtraHeader(String key, String value) {
103
104
104
105
/**
105
106
* Allow to set timeout
107
+ *
106
108
* @param connectTimeout connection timeout in MS
107
- * @param readTimeout socket timeout in MS
109
+ * @param readTimeout socket timeout in MS
108
110
*/
109
111
public void setTimeout (int connectTimeout , int readTimeout ) {
110
112
httpSocketTimeoutMS = readTimeout ;
@@ -113,9 +115,10 @@ public void setTimeout(int connectTimeout, int readTimeout) {
113
115
114
116
/**
115
117
* Allow to set timeout
118
+ *
116
119
* @param connectTimeout connection timeout in MS
117
- * @param readTimeout socket timeout in MS
118
- * @param searchTimeout socket timeout in MS
120
+ * @param readTimeout socket timeout in MS
121
+ * @param searchTimeout socket timeout in MS
119
122
*/
120
123
public void setTimeout (int connectTimeout , int readTimeout , int searchTimeout ) {
121
124
httpSocketTimeoutMS = readTimeout ;
@@ -133,6 +136,7 @@ public void setUserToken(String userToken) {
133
136
134
137
/**
135
138
* List all existing indexes
139
+ *
136
140
* @return a JSON Object in the form:
137
141
* { "items": [ {"name": "contacts", "createdAt": "2013-01-18T15:33:13.556Z"},
138
142
* {"name": "notes", "createdAt": "2013-01-18T15:33:13.556Z"}]}
@@ -157,6 +161,7 @@ protected JSONObject deleteIndex(String indexName) throws AlgoliaException {
157
161
158
162
/**
159
163
* Move an existing index.
164
+ *
160
165
* @param srcIndexName the name of index to copy.
161
166
* @param dstIndexName the new index name that will contains a copy of srcIndexName (destination will be overriten if it already exist).
162
167
*/
@@ -175,6 +180,7 @@ protected JSONObject moveIndex(String srcIndexName, String dstIndexName) throws
175
180
176
181
/**
177
182
* Copy an existing index.
183
+ *
178
184
* @param srcIndexName the name of index to copy.
179
185
* @param dstIndexName the new index name that will contains a copy of srcIndexName (destination will be overriten if it already exist).
180
186
*/
@@ -193,8 +199,9 @@ protected JSONObject copyIndex(String srcIndexName, String dstIndexName) throws
193
199
194
200
/**
195
201
* Return last logs entries.
196
- * @param offset Specify the first entry to retrieve (0-based, 0 is the most recent log entry).
197
- * @param length Specify the maximum number of entries to retrieve starting at offset. Maximum allowed value: 1000.
202
+ *
203
+ * @param offset Specify the first entry to retrieve (0-based, 0 is the most recent log entry).
204
+ * @param length Specify the maximum number of entries to retrieve starting at offset. Maximum allowed value: 1000.
198
205
* @param logType Specify the type of log to retrieve
199
206
*/
200
207
protected JSONObject getLogs (int offset , int length , LogType logType ) throws AlgoliaException {
@@ -318,15 +325,15 @@ protected JSONObject putRequest(String url, String obj) throws AlgoliaException
318
325
}
319
326
320
327
/**
321
- * Reads the answer and return it as a String
328
+ * Reads the answer and return it as a String
322
329
*
323
330
* @param istream the InputStream to read
324
331
* @return the stream's content
325
332
* @throws IOException
326
333
*/
327
334
private String _getAnswer (InputStream istream ) throws IOException {
328
335
InputStreamReader is = new InputStreamReader (istream , "UTF-8" );
329
- StringBuilder builder = new StringBuilder ();
336
+ StringBuilder builder = new StringBuilder ();
330
337
char [] buf = new char [1000 ];
331
338
int l = 0 ;
332
339
while (l >= 0 ) {
0 commit comments