Пример #1
0
 // utility to grovel bitstream formats..
 private static void setFormatToMIMEType(Context context, Bitstream bs, String mimeType)
     throws SQLException {
   BitstreamFormat bf[] = BitstreamFormat.findNonInternal(context);
   for (int i = 0; i < bf.length; ++i) {
     if (bf[i].getMIMEType().equalsIgnoreCase(mimeType)) {
       bs.setFormat(bf[i]);
       break;
     }
   }
 }
Пример #2
0
  /** Test of findNonInternal method, of class BitstreamFormat. */
  @Test
  public void testFindNonInternal() throws SQLException {

    BitstreamFormat[] found = BitstreamFormat.findNonInternal(context);
    assertThat("testFindNonInternal 0", found, notNullValue());
    int i = 0;
    for (BitstreamFormat b : found) {
      i++;
      assertFalse(
          "testFindNonInternal " + i + " (" + b.getShortDescription() + ")", b.isInternal());
    }
  }