コード例 #1
0
 public boolean nextFrame(FrameReader.Handler paramHandler)
 {
   try
   {
     this.source.ᔇ(9L);
   }
   catch (IOException paramHandler)
   {
     return false;
   }
   int i = Http2.readMedium(this.source);
   if ((i < 0) || (i > 16384)) {
     throw Http2.ioException("FRAME_SIZE_ERROR: %s", new Object[] { Integer.valueOf(i) });
   }
   byte b1 = (byte)(this.source.readByte() & 0xFF);
   byte b2 = (byte)(this.source.readByte() & 0xFF);
   int j = this.source.readInt() & 0x7FFFFFFF;
   if (Http2.logger.isLoggable(Level.FINE)) {
     Http2.logger.fine(Http2.FrameLogger.formatHeader(true, j, i, b1, b2));
   }
   switch (b1)
   {
   default: 
     break;
   case 0: 
     readData(paramHandler, i, b2, j);
     break;
   case 1: 
     readHeaders(paramHandler, i, b2, j);
     break;
   case 2: 
     readPriority(paramHandler, i, b2, j);
     break;
   case 3: 
     readRstStream(paramHandler, i, b2, j);
     break;
   case 4: 
     readSettings(paramHandler, i, b2, j);
     break;
   case 5: 
     readPushPromise(paramHandler, i, b2, j);
     break;
   case 6: 
     readPing(paramHandler, i, b2, j);
     break;
   case 7: 
     readGoAway(paramHandler, i, b2, j);
     break;
   case 8: 
     readWindowUpdate(paramHandler, i, b2, j);
     break;
   }
   this.source.ᵋ(i);
   return true;
 }
コード例 #2
0
 private void readContinuationHeader()
 {
   int i = this.streamId;
   int j = Http2.readMedium(this.source);
   this.left = j;
   this.length = j;
   byte b = (byte)(this.source.readByte() & 0xFF);
   this.flags = ((byte)(this.source.readByte() & 0xFF));
   if (Http2.logger.isLoggable(Level.FINE)) {
     Http2.logger.fine(Http2.FrameLogger.formatHeader(true, this.streamId, this.length, b, this.flags));
   }
   this.streamId = (this.source.readInt() & 0x7FFFFFFF);
   if (b != 9) {
     throw Http2.ioException("%s != TYPE_CONTINUATION", new Object[] { Byte.valueOf(b) });
   }
   if (this.streamId != i) {
     throw Http2.ioException("TYPE_CONTINUATION streamId changed", new Object[0]);
   }
 }