public void deleteQueue(int queueId) throws QueueDeleteException, QueueDoesNotExistException {
        try {
            _out.writeInt(8); //Size
            _out.writeInt(Response.MSG_QUEUE_DELETE);
            _out.writeInt(queueId);
            _out.flush();

            int messageType = _in.readInt();
            if(messageType != Response.STATUS_OK) {
                int errorCode = _in.readInt();
                if(errorCode == Response.ERR_QUEUE_DELETE_EXCEPTION) {
                    throw new QueueDeleteException(new Exception());
                } else if(errorCode == Response.ERR_QUEUE_DOES_NOT_EXIST_EXCEPTION) {
                    throw new QueueDoesNotExistException(new Exception());
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }