MCPcopy Create free account
hub / github.com/LibreOffice/core / checkStream

Method checkStream

odk/examples/java/Storage/TestHelper.java:461–485  ·  view source on GitHub ↗
( XStorage xParentStorage,
                                String sName,
                                String sMediaType,
                                byte[] pBytes )

Source from the content-addressed store, hash-verified

459 }
460
461 public boolean checkStream( XStorage xParentStorage,
462 String sName,
463 String sMediaType,
464 byte[] pBytes )
465 {
466 // open substream element first
467 XStream xSubStream = null;
468 try
469 {
470 Object oSubStream = xParentStorage.openStreamElement( sName, ElementModes.READ );
471 xSubStream = UnoRuntime.queryInterface( XStream.class, oSubStream );
472 if ( xSubStream == null )
473 {
474 Error( "Can't open substream '" + sName + "'!" );
475 return false;
476 }
477 }
478 catch( Exception e )
479 {
480 Error( "Can't open substream '" + sName + "', exception : " + e + "!" );
481 return false;
482 }
483
484 return InternalCheckStream( xSubStream, sName, sMediaType, pBytes );
485 }
486
487 public boolean checkEncrStream( XStorage xParentStorage,
488 String sName,

Callers 5

testMethod · 0.45
testMethod · 0.45
testMethod · 0.45
testMethod · 0.45
testMethod · 0.45

Calls 4

queryInterfaceMethod · 0.95
ErrorMethod · 0.95
InternalCheckStreamMethod · 0.95
openStreamElementMethod · 0.45

Tested by

no test coverage detected