( XStorage xParentStorage,
String sName,
String sMediaType,
byte[] pBytes )
| 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, |
no test coverage detected