358359360361362363364365366367368
int pos = 0; try { ios.mark(); do { if (pos + 4 > length) { ios.reset(); ios.mark(); pos = 0; } ios.writeInt(0); pos += 4;
368369370371372373374375376377378
pos += 4; } while (--numReps >= 0); } catch (IOException e) { e.printStackTrace(); } finally { try { ios.reset(); } catch (IOException e) {} } } } private static class IOSWriteFloat extends OutputStreamTests {
396397398399400401402403404405406
int pos = 0; try { ios.mark(); do { if (pos + 4 > length) { ios.reset(); ios.mark(); pos = 0; } ios.writeFloat(0.0f); pos += 4;
406407408409410411412413414415416
pos += 4; } while (--numReps >= 0); } catch (IOException e) { e.printStackTrace(); } finally { try { ios.reset(); } catch (IOException e) {} } } } private static class IOSWriteLong extends OutputStreamTests {
434435436437438439440441442443444
int pos = 0; try { ios.mark(); do { if (pos + 8 > length) { ios.reset(); ios.mark(); pos = 0; } ios.writeLong(0L); pos += 8;
444445446447448449450451452453454
pos += 8; } while (--numReps >= 0); } catch (IOException e) { e.printStackTrace(); } finally { try { ios.reset(); } catch (IOException e) {} } } } private static class IOSWriteDouble extends OutputStreamTests {
472473474475476477478479480481482
int pos = 0; try { ios.mark(); do { if (pos + 8 > length) { ios.reset(); ios.mark(); pos = 0; } ios.writeDouble(0.0); pos += 8;
482483484485486487488489490491
pos += 8; } while (--numReps >= 0); } catch (IOException e) { e.printStackTrace(); } finally { try { ios.reset(); } catch (IOException e) {} } } } }