Removed Writer.close().

This commit is contained in:
akwizgran
2011-07-22 18:08:05 +01:00
parent fe58fb4c30
commit 5d000b62f8
7 changed files with 3 additions and 17 deletions

View File

@@ -152,7 +152,6 @@ public class BatchReaderTest extends TestCase {
w.writeUserDefinedTag(Tags.MESSAGE);
w.writeRaw(new byte[size - 10]);
w.writeListEnd();
w.close();
byte[] b = out.toByteArray();
assertEquals(size, b.length);
return b;
@@ -164,7 +163,6 @@ public class BatchReaderTest extends TestCase {
w.writeUserDefinedTag(Tags.BATCH);
w.writeListStart();
w.writeListEnd();
w.close();
return out.toByteArray();
}

View File

@@ -72,7 +72,6 @@ public class BundleReaderImplTest extends TestCase {
w.writeUserDefinedTag(Tags.BATCH);
w.writeList(Collections.emptyList());
w.writeListEnd();
w.close();
byte[] headless = out.toByteArray();
// Try to read a header from the headless bundle
ByteArrayInputStream in = new ByteArrayInputStream(headless);
@@ -96,7 +95,6 @@ public class BundleReaderImplTest extends TestCase {
w.writeList(Collections.emptyList()); // Subs
w.writeMap(Collections.emptyMap()); // Transports
w.writeInt64(System.currentTimeMillis()); // Timestamp
w.close();
byte[] headerOnly = out.toByteArray();
// Try to read a header from the header-only bundle
ByteArrayInputStream in = new ByteArrayInputStream(headerOnly);
@@ -122,7 +120,6 @@ public class BundleReaderImplTest extends TestCase {
w.writeInt64(System.currentTimeMillis()); // Timestamp
w.writeListStart();
w.writeListEnd();
w.close();
byte[] batchless = out.toByteArray();
// It should be possible to read the header and null
ByteArrayInputStream in = new ByteArrayInputStream(batchless);
@@ -210,7 +207,6 @@ public class BundleReaderImplTest extends TestCase {
w.writeUserDefinedTag(Tags.BATCH);
w.writeList(Collections.emptyList()); // Messages
w.writeListEnd();
w.close();
return out.toByteArray();
}

View File

@@ -133,7 +133,6 @@ public class HeaderReaderTest extends TestCase {
w.writeMapEnd();
// Timestamp
w.writeInt64(System.currentTimeMillis());
w.close();
assertEquals(size, out.size());
return out.toByteArray();
}
@@ -153,7 +152,6 @@ public class HeaderReaderTest extends TestCase {
w.writeMapEnd();
// Timestamp
w.writeInt64(System.currentTimeMillis());
w.close();
return out.toByteArray();
}
}