Package java.io

Examples of java.io.ObjectInput.readLong()


                        throw new UnmarshalException(
                            "skeleton class not found but required " +
                            "for client version");
                    }
                }
                op = in.readLong();
            } catch (Exception readEx) {
                throw new UnmarshalException("error unmarshalling call header",
                                             readEx);
            }
View Full Code Here


                    Class<?> clazz = Class.forName("sun.rmi.transport.DGCImpl_Skel");
                    if (clazz.isAssignableFrom(skel.getClass())) {
                        ((MarshalInputStream)in).useCodebaseOnly();
                    }
                } catch (ClassNotFoundException ignore) { }
                hash = in.readLong();
            } catch (Exception readEx) {
                throw new UnmarshalException("error unmarshalling call header",
                                             readEx);
            }
View Full Code Here

                        throw new UnmarshalException(
                            "skeleton class not found but required " +
                            "for client version");
                    }
                }
                op = in.readLong();
            } catch (Exception readEx) {
                throw new UnmarshalException("error unmarshalling call header",
                                             readEx);
            }
View Full Code Here

        try {
            // read remote call header
            ObjectInput in;
            try {
                in = call.getInputStream();
                hash = in.readLong();
            } catch (Exception readEx) {
                throw new UnmarshalException("error unmarshalling call header",
                                             readEx);
            }
View Full Code Here

    void testClearOnAbortFromStream() throws Exception {
        start();
        InternalCacheEntry entry = InternalEntryFactory.create("key", "value");
        expect(cacheMap.put(entry.getKey(), entry)).andReturn(null);
        ObjectInput ois = createMock(ObjectInput.class);
        expect(ois.readLong()).andReturn(new Long(1));
        com.sleepycat.je.Transaction txn = createMock(com.sleepycat.je.Transaction.class);
        expect(currentTransaction.beginTransaction(null)).andReturn(txn);
        cacheMap.clear();
        Cursor cursor = createMock(Cursor.class);
        expect(cacheDb.openCursor(txn, null)).andReturn(cursor);
View Full Code Here

            assertEquals("Test" + i ,value);
        }

        assertEquals((char)55,input.readChar());

        assertEquals(5,input.readLong());

        for (int i=0;i<10;i++)
        {
            String value = input.readUTF();
            assertEquals("Test" + i ,value);
View Full Code Here

   public void testClearOnAbortFromStream() throws Exception {
      start();
      InternalCacheEntry entry = TestInternalCacheEntryFactory.create("key", "value");
      when(cacheMap.put(entry.getKey(), entry)).thenReturn(null);
      ObjectInput ois = mock(ObjectInput.class);
      when(ois.readLong()).thenReturn((long) 1);
      com.sleepycat.je.Transaction txn = mock(com.sleepycat.je.Transaction.class);
      when(currentTransaction.beginTransaction(null)).thenReturn(txn);
      Cursor cursor = mock(Cursor.class);
      when(cacheDb.openCursor(txn, null)).thenReturn(cursor);
      IOException ex = new IOException();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.