Skip to content

Commit cd3bc5a

Browse files
committed
update Java version
1 parent 3948bbd commit cd3bc5a

File tree

82 files changed

+3817
-4647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3817
-4647
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
46+
uses: github/codeql-action/init@v3
4747
with:
4848
languages: ${{ matrix.language }}
4949
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
5454
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5555
# If this step fails, then you should remove it and run the build manually (see later)
5656
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
57+
uses: github/codeql-action/autobuild@v3
5858

5959
# ℹ️ Command-line programs to run using the OS shell.
6060
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
6868
# make release
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
71+
uses: github/codeql-action/analyze@v3

api/com.upokecenter.cbor.CBORDataUtilities.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ Contains methods useful for reading and writing data, with a focus on CBOR.
7979
## Method Details
8080

8181
### ParseJSONNumber
82+
8283
public static CBORObject ParseJSONNumber(String str)
84+
8385
Parses a number whose format follows the JSON specification. The method uses
8486
a JSONOptions with all default properties.
8587

@@ -93,7 +95,9 @@ Parses a number whose format follows the JSON specification. The method uses
9395
parsing fails, including if the string is null or empty.
9496

9597
### ParseJSONNumber
98+
9699
public static CBORObject ParseJSONNumber(String str, JSONOptions options)
100+
97101
<p>Parses a number whose format follows the JSON specification (RFC 8259)
98102
and converts that number to a CBOR object.</p> <p>Roughly speaking, a valid
99103
JSON number consists of an optional minus sign, one or more basic digits
@@ -118,7 +122,9 @@ Parses a number whose format follows the JSON specification. The method uses
118122
parsing fails, including if the string is null or empty.
119123

120124
### ParseJSONNumber
125+
121126
public static CBORObject ParseJSONNumber(String str, int offset, int count)
127+
122128
<p>Parses a number whose format follows the JSON specification (RFC 8259)
123129
from a portion of a text string, and converts that number to a CBOR
124130
object.</p> <p>Roughly speaking, a valid JSON number consists of an optional
@@ -153,7 +159,9 @@ Parses a number whose format follows the JSON specification. The method uses
153159
* <code>NullPointerException</code> - The parameter <code>str</code> is null.
154160

155161
### ParseJSONNumber
162+
156163
public static CBORObject ParseJSONNumber(String str, int offset, int count, JSONOptions options)
164+
157165
<p>Parses a number whose format follows the JSON specification (RFC 8259)
158166
and converts that number to a CBOR object.</p> <p>Roughly speaking, a valid
159167
JSON number consists of an optional minus sign, one or more basic digits
@@ -191,7 +199,9 @@ Parses a number whose format follows the JSON specification. The method uses
191199
* <code>IllegalArgumentException</code> - Unsupported conversion kind.
192200

193201
### ParseJSONNumber
202+
194203
public static CBORObject ParseJSONNumber(byte[] bytes, int offset, int count, JSONOptions options)
204+
195205
<p>Parses a number from a byte sequence whose format follows the JSON
196206
specification (RFC 8259) and converts that number to a CBOR object.</p>
197207
<p>Roughly speaking, a valid JSON number consists of an optional minus sign,
@@ -229,7 +239,9 @@ Parses a number whose format follows the JSON specification. The method uses
229239
* <code>IllegalArgumentException</code> - Unsupported conversion kind.
230240

231241
### ParseJSONNumber
242+
232243
public static CBORObject ParseJSONNumber(byte[] bytes, JSONOptions options)
244+
233245
<p>Parses a number from a byte sequence whose format follows the JSON
234246
specification (RFC 8259) and converts that number to a CBOR object.</p>
235247
<p>Roughly speaking, a valid JSON number consists of an optional minus sign,
@@ -254,7 +266,9 @@ Parses a number whose format follows the JSON specification. The method uses
254266
parsing fails, including if the byte sequence is null or empty.
255267

256268
### ParseJSONNumber
269+
257270
public static CBORObject ParseJSONNumber(byte[] bytes, int offset, int count)
271+
258272
<p>Parses a number whose format follows the JSON specification (RFC 8259)
259273
from a portion of a byte sequence, and converts that number to a CBOR
260274
object.</p> <p>Roughly speaking, a valid JSON number consists of an optional
@@ -289,7 +303,9 @@ Parses a number whose format follows the JSON specification. The method uses
289303
* <code>NullPointerException</code> - The parameter <code>bytes</code> is null.
290304

291305
### ParseJSONNumber
306+
292307
public static CBORObject ParseJSONNumber(byte[] bytes)
308+
293309
Parses a number from a byte sequence whose format follows the JSON
294310
specification. The method uses a JSONOptions with all default properties.
295311

@@ -303,7 +319,9 @@ Parses a number from a byte sequence whose format follows the JSON
303319
parsing fails, including if the byte sequence is null or empty.
304320

305321
### ParseJSONNumber
322+
306323
public static CBORObject ParseJSONNumber(char[] chars, int offset, int count, JSONOptions options)
324+
307325
<p>Parses a number from a sequence of <code>char</code> s whose format follows
308326
the JSON specification (RFC 8259) and converts that number to a CBOR
309327
object.</p> <p>Roughly speaking, a valid JSON number consists of an optional
@@ -341,7 +359,9 @@ Parses a number from a byte sequence whose format follows the JSON
341359
* <code>IllegalArgumentException</code> - Unsupported conversion kind.
342360

343361
### ParseJSONNumber
362+
344363
public static CBORObject ParseJSONNumber(char[] chars, JSONOptions options)
364+
345365
<p>Parses a number from a sequence of <code>char</code> s whose format follows
346366
the JSON specification (RFC 8259) and converts that number to a CBOR
347367
object.</p> <p>Roughly speaking, a valid JSON number consists of an optional
@@ -366,7 +386,9 @@ Parses a number from a byte sequence whose format follows the JSON
366386
parsing fails, including if the sequence of <code>char</code> s is null or empty.
367387

368388
### ParseJSONNumber
389+
369390
public static CBORObject ParseJSONNumber(char[] chars, int offset, int count)
391+
370392
<p>Parses a number whose format follows the JSON specification (RFC 8259)
371393
from a portion of a sequence of <code>char</code> s, and converts that number to
372394
a CBOR object.</p> <p>Roughly speaking, a valid JSON number consists of an
@@ -401,7 +423,9 @@ Parses a number from a byte sequence whose format follows the JSON
401423
* <code>NullPointerException</code> - The parameter <code>chars</code> is null.
402424

403425
### ParseJSONNumber
426+
404427
public static CBORObject ParseJSONNumber(char[] chars)
428+
405429
Parses a number from a sequence of <code>char</code> s whose format follows the
406430
JSON specification. The method uses a JSONOptions with all default
407431
properties.

api/com.upokecenter.cbor.CBORDateConverter.ConversionType.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ the order they are declared.
3636
## Method Details
3737

3838
### values
39+
3940
public static CBORDateConverter.ConversionType[] values()
41+
4042
### valueOf
43+
4144
public static CBORDateConverter.ConversionType valueOf(String name)

api/com.upokecenter.cbor.CBORDateConverter.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,18 @@
8383
## Field Details
8484

8585
### TaggedString
86+
8687
public static final CBORDateConverter TaggedString
88+
8789
A converter object where FromCBORObject accepts CBOR objects with tag 0
8890
(date/time strings) and tag 1 (number of seconds since the start of 1970),
8991
and ToCBORObject converts date/time objects (java.util.Date in DotNet, and Date in
9092
Java) to CBOR objects of tag 0.
93+
9194
### TaggedNumber
95+
9296
public static final CBORDateConverter TaggedNumber
97+
9398
A converter object where FromCBORObject accepts CBOR objects with tag 0
9499
(date/time strings) and tag 1 (number of seconds since the start of 1970),
95100
and ToCBORObject converts date/time objects (java.util.Date in DotNet, and Date in
@@ -100,8 +105,11 @@ A converter object where FromCBORObject accepts CBOR objects with tag 0
100105
lossy otherwise. The ToCBORObject conversion will throw an exception if the
101106
conversion to binary64 results in positive infinity, negative infinity, or
102107
not-a-number.
108+
103109
### UntaggedNumber
110+
104111
public static final CBORDateConverter UntaggedNumber
112+
105113
A converter object where FromCBORObject accepts untagged CBOR integer or
106114
CBOR floating-point objects that give the number of seconds since the start
107115
of 1970, and where ToCBORObject converts date/time objects (java.util.Date in
@@ -112,18 +120,23 @@ A converter object where FromCBORObject accepts untagged CBOR integer or
112120
conversion is lossy otherwise. The ToCBORObject conversion will throw an
113121
exception if the conversion to binary64 results in positive infinity,
114122
negative infinity, or not-a-number.
123+
115124
## Method Details
116125

117126
### getType
127+
118128
public final CBORDateConverter.ConversionType getType()
129+
119130
Gets the conversion type for this date converter.
120131

121132
**Returns:**
122133

123134
* The conversion type for this date converter.
124135

125136
### FromCBORObject
137+
126138
public Date FromCBORObject(CBORObject obj)
139+
127140
Converts a CBOR object to a java.util.Date (in DotNet) or a Date (in Java).
128141

129142
**Specified by:**
@@ -148,7 +161,9 @@ Converts a CBOR object to a java.util.Date (in DotNet) or a Date (in Java).
148161
not supported, or another error occurred in conversion.
149162

150163
### TryGetDateTimeFields
164+
151165
public boolean TryGetDateTimeFields(CBORObject obj, com.upokecenter.numbers.EInteger[] year, int[] lesserFields)
166+
152167
Tries to extract the fields of a date and time in the form of a CBOR object.
153168

154169
**Parameters:**
@@ -180,7 +195,9 @@ Tries to extract the fields of a date and time in the form of a CBOR object.
180195
otherwise.
181196

182197
### DateTimeFieldsToCBORObject
198+
183199
public CBORObject DateTimeFieldsToCBORObject(int smallYear, int month, int day)
200+
184201
Converts a date/time in the form of a year, month, and day to a CBOR object.
185202
The hour, minute, and second are treated as 00:00:00 by this method, and the
186203
time offset is treated as 0 by this method.
@@ -195,15 +212,17 @@ Converts a date/time in the form of a year, month, and day to a CBOR object.
195212

196213
**Returns:**
197214

198-
* A CBOR object encoding the given date fields according to the
215+
* A CBOR object encoding the specified date fields according to the
199216
conversion type used to create this date converter.
200217

201218
**Throws:**
202219

203220
* <code>CBORException</code> - An error occurred in conversion.
204221

205222
### DateTimeFieldsToCBORObject
223+
206224
public CBORObject DateTimeFieldsToCBORObject(int smallYear, int month, int day, int hour, int minute, int second)
225+
207226
Converts a date/time in the form of a year, month, day, hour, minute, and
208227
second to a CBOR object. The time offset is treated as 0 by this method.
209228

@@ -223,15 +242,17 @@ Converts a date/time in the form of a year, month, day, hour, minute, and
223242

224243
**Returns:**
225244

226-
* A CBOR object encoding the given date fields according to the
245+
* A CBOR object encoding the specified date fields according to the
227246
conversion type used to create this date converter.
228247

229248
**Throws:**
230249

231250
* <code>CBORException</code> - An error occurred in conversion.
232251

233252
### DateTimeFieldsToCBORObject
253+
234254
public CBORObject DateTimeFieldsToCBORObject(int year, int[] lesserFields)
255+
235256
Converts a date/time in the form of a year, month, day, hour, minute,
236257
second, fractional seconds, and time offset to a CBOR object.
237258

@@ -245,7 +266,7 @@ Converts a date/time in the form of a year, month, day, hour, minute,
245266

246267
**Returns:**
247268

248-
* A CBOR object encoding the given date fields according to the
269+
* A CBOR object encoding the specified date fields according to the
249270
conversion type used to create this date converter.
250271

251272
**Throws:**
@@ -255,7 +276,9 @@ Converts a date/time in the form of a year, month, day, hour, minute,
255276
* <code>CBORException</code> - An error occurred in conversion.
256277

257278
### DateTimeFieldsToCBORObject
279+
258280
public CBORObject DateTimeFieldsToCBORObject(com.upokecenter.numbers.EInteger bigYear, int[] lesserFields)
281+
259282
Converts a date/time in the form of a year, month, day, hour, minute,
260283
second, fractional seconds, and time offset to a CBOR object.
261284

@@ -269,7 +292,7 @@ Converts a date/time in the form of a year, month, day, hour, minute,
269292

270293
**Returns:**
271294

272-
* A CBOR object encoding the given date fields according to the
295+
* A CBOR object encoding the specified date fields according to the
273296
conversion type used to create this date converter.
274297

275298
**Throws:**
@@ -280,7 +303,9 @@ Converts a date/time in the form of a year, month, day, hour, minute,
280303
* <code>CBORException</code> - An error occurred in conversion.
281304

282305
### ToCBORObject
306+
283307
public CBORObject ToCBORObject(Date obj)
308+
284309
Converts a java.util.Date (in DotNet) or Date (in Java) to a CBOR object in a
285310
manner specified by this converter's conversion type.
286311

0 commit comments

Comments
 (0)