Check-in [8312e39f0f]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Implement some base methods for writing data.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8312e39f0f282d6795b127015611d0faedd8a4ec
User & Date: stephanie.gawroriski 2019-08-11 15:40:45
Context
2019-08-11
17:18
Writing of bytes and such; Update PGP key as it has just expired. check-in: 0411527e1a user: stephanie.gawroriski tags: trunk
15:40
Implement some base methods for writing data. check-in: 8312e39f0f user: stephanie.gawroriski tags: trunk
15:16
Refactor the minimizer to use the new table section output as it is easier to manage. check-in: 5bd3e800ba user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/apis/cldc-compact/java/io/DataOutput.java.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	public abstract void writeBoolean(boolean __v)
		throws IOException;
	
	public abstract void writeByte(int __v)
		throws IOException;
	
	public abstract void writeBytes(String __v)
		throws IOException;
	
	public abstract void writeChar(int __v)
		throws IOException;
	
	public abstract void writeChars(String __v)
		throws IOException;
	
	public abstract void writeDouble(double __v)
		throws IOException;
	
	public abstract void writeFloat(float __v)
		throws IOException;
	







|





|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	public abstract void writeBoolean(boolean __v)
		throws IOException;
	
	public abstract void writeByte(int __v)
		throws IOException;
	
	public abstract void writeBytes(String __v)
		throws IOException, NullPointerException;
	
	public abstract void writeChar(int __v)
		throws IOException;
	
	public abstract void writeChars(String __v)
		throws IOException, NullPointerException;
	
	public abstract void writeDouble(double __v)
		throws IOException;
	
	public abstract void writeFloat(float __v)
		throws IOException;
	

Changes to runt/libs/io/net/multiphasicapps/io/TableSectionOutputStream.java.

269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351




352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373









374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
...
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430



431
432
433
434
435
436
437
438
439
440
441







442
443
444
445
446
447
448
...
470
471
472
473
474
475
476
477


478
479
480
481
482
483
484
485
486
487
488

489
490
491
492
493
494
495
		@Override
		public final void write(byte[] __b)
			throws IOException, NullPointerException
		{
			if (__b == null)
				throw new NullPointerException("NARG");
			
			throw new todo.TODO();
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
................................................................................
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeByte(int __v)
			throws IOException
		{
			throw new todo.TODO();
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeBytes(String __v)
			throws IOException
		{
			throw new todo.TODO();




		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeChar(int __v)
			throws IOException
		{
			throw new todo.TODO();
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeChars(String __v)
			throws IOException
		{
			throw new todo.TODO();









		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeDouble(double __v)
			throws IOException
		{
			throw new todo.TODO();
		}
		
		/**
		 * Writes the size of the file as an integer.
		 *
		 * @throws IOException On write errors.
		 * @since 2019/08/11
................................................................................
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeFloat(float __v)
			throws IOException
		{
			throw new todo.TODO();
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeInt(int __v)
			throws IOException
		{
			throw new todo.TODO();



		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeLong(long __v)
			throws IOException
		{
			throw new todo.TODO();







		}
		
		/**
		 * Writes the specified number of bytes as padding, the padding
		 * value is zero.
		 *
		 * @param __n The number of bytes to pad with.
................................................................................
			if (__n < 0)
				throw new IllegalArgumentException("BD3j " + __n);
			
			// Not writing anything, so ignore
			if (__n == 0)
				return;
			
			throw new todo.TODO();


		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeShort(int __v)
			throws IOException
		{
			throw new todo.TODO();

		}
		
		/**
		 * Writes the address of the given section as an integer.
		 *
		 * @param __s The section to write the address of.
		 * @throws IOException On write errors.







|







 







|








|

|
>
>
>
>










|








|

|
>
>
>
>
>
>
>
>
>










|







 







|










|
>
>
>










|
>
>
>
>
>
>
>







 







|
>
>










|
>







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
...
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
...
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
		@Override
		public final void write(byte[] __b)
			throws IOException, NullPointerException
		{
			if (__b == null)
				throw new NullPointerException("NARG");
			
			this.write(__b, 0, __b.length);
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
................................................................................
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeByte(int __v)
			throws IOException
		{
			this.write(__v);
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeBytes(String __v)
			throws IOException, NullPointerException
		{
			if (__v == null)
				throw new NullPointerException("NARG");
			
			for (int i = 0, n = __v.length(); i < n; i++)
				this.write(__v.charAt(i));
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeChar(int __v)
			throws IOException
		{
			this.writeShort(__v);
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeChars(String __v)
			throws IOException, NullPointerException
		{
			if (__v == null)
				throw new NullPointerException("NARG");
			
			for (int i = 0, n = __v.length(); i < n; i++)
			{
				char c = __v.charAt(i);
				
				this.write(c >> 8);
				this.write(c);
			}
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeDouble(double __v)
			throws IOException
		{
			this.writeLong(Double.doubleToLongBits(__v));
		}
		
		/**
		 * Writes the size of the file as an integer.
		 *
		 * @throws IOException On write errors.
		 * @since 2019/08/11
................................................................................
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeFloat(float __v)
			throws IOException
		{
			this.writeInt(Float.floatToIntBits(__v));
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeInt(int __v)
			throws IOException
		{
			this.write(__v >> 24);
			this.write(__v >> 16);
			this.write(__v >> 8);
			this.write(__v);
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeLong(long __v)
			throws IOException
		{
			this.write((int)(__v >> 56));
			this.write((int)(__v >> 48));
			this.write((int)(__v >> 40));
			this.write((int)(__v >> 32));
			this.write((int)(__v >> 24));
			this.write((int)(__v >> 16));
			this.write((int)(__v >> 8));
			this.write((int)(__v));
		}
		
		/**
		 * Writes the specified number of bytes as padding, the padding
		 * value is zero.
		 *
		 * @param __n The number of bytes to pad with.
................................................................................
			if (__n < 0)
				throw new IllegalArgumentException("BD3j " + __n);
			
			// Not writing anything, so ignore
			if (__n == 0)
				return;
			
			// Write the padding
			for (int i = 0; i < __n; i++)
				this.write(__v);
		}
		
		/**
		 * {@inheritDoc}
		 * @since 2019/08/11
		 */
		@Override
		public final void writeShort(int __v)
			throws IOException
		{
			this.write(__v >> 8);
			this.write(__v);
		}
		
		/**
		 * Writes the address of the given section as an integer.
		 *
		 * @param __s The section to write the address of.
		 * @throws IOException On write errors.