Ejemplo n.º 1
0
 private static long length(final AudioStreamProvider stream) {
   if (!stream.isSeekable()) {
     return -1L;
   }
   try {
     return stream.length();
   } catch (IOException ex) {
     JOrbisStream.m_logger.debug(
         (Object) "Probl\u00e8me lors du length() sur le stream !", (Throwable) ex);
     return -1L;
   }
 }
Ejemplo n.º 2
0
 private static int seek(final AudioStreamProvider stream, final long offset, final int type) {
   if (!stream.isSeekable()) {
     return -1;
   }
   try {
     if (type == 0) {
       stream.seek(offset);
     } else if (type == 1) {
       stream.seek(stream.length() - offset);
     }
     return 0;
   } catch (IOException ex) {
     JOrbisStream.m_logger.debug(
         (Object) "Probl\u00e8me lors du seek sur le stream !", (Throwable) ex);
     return -1;
   }
 }