Java 8 SerialException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SerialException class.

This code example shows how to use the following methods:
	@Test public void testReferencePersistenceError() throws Exception {
    	String testString = "this is test clob"; //$NON-NLS-1$
        SerialClob clob = new SerialClob(testString.toCharArray()) {
        	@Override 
        	public Reader getCharacterStream() throws SerialException {
        		throw new SerialException();
        	} 
        }; 
         
        ClobType cv = new ClobType(clob);
        cv.setReferenceStreamId(null);
         
        // now force to serialize 
        ClobType read = UnitTestUtil.helpSerialize(cv);
         
        assertTrue(read.length() > 0);
        assertNotNull(read.getReferenceStreamId());
        assertNull(read.getReference());
    } 
     
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 SerialException Methods: