Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2007-2014 Kaazing Corporation. All rights reserved. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 
 package org.kaazing.gateway.transport.wsr;
 
 public abstract class RtmpStreamMessage extends RtmpMessage {
 
     public static enum StreamKind { 
         SET_CHUNK_SIZE(1), ABORT(2), ACKNOWLEDGMENT(3), USER(4), WINDOW_ACKNOWLEDGMENT_SIZE(5), SET_PEER_BANDWIDTH(6), DATA_AMF3(15), COMMAND_AMF3(17), DATA_AMF0(18), COMMAND_AMF0(20);
         
         private final byte code;
         
         private StreamKind(int code) {
             this. = (byte)code;
         }
         
         public byte getCode() {
             return ;
         }
         
         public static StreamKind decode(int code) {
             switch (code) {
             case 1:
                 return ;
             case 2:
                 return ;
             case 3:
                 return ;
             case 4:
                 return ;
             case 5:
                 return ;
             case 6:
                 return ;
             case 15:
             	return ;
             case 17:
             	return ;
             case 18:
                 return ;
             case 20:
                 return ;
             case 8:
             	// unexpected audio
             default:
                 throw new IllegalArgumentException("Unexcepted code: " + code);
             }
         }
     }
 
     private int timestamp;
     private int messageStreamId;
     private int chunkStreamId;
 
     public void setTimestamp(int timestamp) {
         this. = timestamp;
     }
 
     public int getTimestamp() {
         return ;
     }
 
     public void setMessageStreamId(int messageStreamId) {
         this. = messageStreamId;
     }
 
     public int getMessageStreamId() {
         return ;
     }
     
     public final Kind getKind() {
         return .;
     }
     
     public abstract StreamKind getStreamKind();
 
     public void setChunkStreamId(int chunkStreamId) {
         this. = chunkStreamId;
     }
 
     public int getChunkStreamId() {
        return ;
    }
    
New to GrepCode? Check out our FAQ X