If you have been arrested and are currently in prison in Oregon, you may believe that you are there unlawfully. However, as FindLaw explains, because the judge has not ruled in your case, you cannot appeal. You may still have an option for challenging the legality of your imprisonment through a writ of habeas corpus.

A writ is a court order that takes effect immediately, and when a higher court issues one, it disrupts the normal course of your trial in the lower court. Because this is likely to cause delays in the court system, a writ is a last resort. If it is necessary to prevent you from suffering irreparable harm because of a wrong decision from the lower court, though, and you have no other options, it may be issued.

The writ of habeas corpus is not directly to the lower court, but to the prison official. It states that you must be brought before the court, so the judge can determine if you have been unlawfully imprisoned. This legal solution can prevent people from being kept in jail indefinitely while waiting to be charged or to have a hearing. 

Your ability to have errors examined so your situation can be corrected is an essential part of the U.S. court system. You do have to have evidence that is both clear and convincing before any action will be taken by the court, though. 

This information may help you understand the concept of a writ of habeas corpus, but it is general in nature and should not be interpreted as legal advice.